Tuesday, 14 February 2017

How to use java tabbed pane program jsp

#   Tabbed Pane Demo program


//****************************Start******************

import javax.swing.*;
import java.awt.*;
import javax.swing.tree.*;

public class tabbed_pane extends JFrame {

    JTabbedPane t;
    JPanel p1, p2;
    JButton b1, b2;

    public tabbed_pane() {
        Container c = getContentPane();
        c.setLayout(new BorderLayout());
        t = new JTabbedPane();
        p1 = new JPanel();
        p2 = new JPanel();
        b1 = new JButton("OK");
        b2 = new JButton("Cancel");
        p1.add(b1);
        p2.add(b2);
        t.add("Tab 1", p1);
        t.add("Tab 2", p2);
        c.add(t);
        setSize(300, 300);
        setVisible(true);
    }

    public static void main(String arsg[]) {
        tabbed_pane obj = new tabbed_pane();
    }
}

//******************************End***************

No comments:

Post a Comment

Welcome, happy learning

Charactor_At_Position

public class Char_At_Position { public static void main(String[] args) { String str = "Wankhede"; String rev=""...