FileDocCategorySizeDatePackage
SeparatorExample.javaAPI DocExample1221Mon Nov 09 12:45:48 GMT 1998None

SeparatorExample

public class SeparatorExample extends JPanel

Fields Summary
Constructors Summary
public SeparatorExample()

        super(true);

        setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
        Box box1 = new Box(BoxLayout.X_AXIS);
        Box box2 = new Box(BoxLayout.X_AXIS);
        Box box3 = new Box(BoxLayout.X_AXIS);

        box1.add(new JButton("Press Me"));
        box1.add(new JButton("No Me!"));
        box1.add(new JButton("Ignore Them!"));
        box2.add(new JSeparator());
        box3.add(new JButton("I'm the Button!"));
        box3.add(new JButton("It's me!"));
        box3.add(new JButton("Go Away!"));

        add(box1);
        add(box2);
        add(box3);
    
Methods Summary
public static voidmain(java.lang.String[] s)

         WindowListener l = new WindowAdapter() {
             public void windowClosing(WindowEvent e) {System.exit(0);}
         };

        SeparatorExample example = new SeparatorExample();

        JFrame frame = new JFrame("Separator Example");
        frame.addWindowListener(l);
        frame.setContentPane(example);
        frame.pack();
        frame.setVisible(true);