FileDocCategorySizeDatePackage
Border2.javaAPI DocExample969Mon May 01 14:41:58 BST 2000None

Border2

public class Border2 extends JPanel

Fields Summary
Constructors Summary
public Border2()

    setLayout(new BorderLayout(  ));
    JPanel p = new JPanel(  );
    p.add(new JButton("North"));
    add(p, BorderLayout.NORTH);
    p = new JPanel(  );
    p.add(new JButton("South"));
    add(p, BorderLayout.SOUTH);
    p = new JPanel(  );
    p.add(new JButton("East"));
    add(p, BorderLayout.EAST);
    p = new JPanel(  );
    p.add(new JButton("West"));
    add(p, BorderLayout.WEST);
    p = new JPanel(  );
    p.add(new JButton("Center"));
    add(p, BorderLayout.CENTER);
  
Methods Summary
public static voidmain(java.lang.String[] args)

    JFrame f = new JFrame("Border2");
    f.addWindowListener(new WindowAdapter(  ) {
      public void windowClosing(WindowEvent e) { System.exit(0); }
    });
    f.setSize(225, 150);
    f.setLocation(200, 200);
    f.setContentPane(new Border2(  ));
    f.setVisible(true);