FileDocCategorySizeDatePackage
Grid.javaAPI DocExample653Mon May 01 14:41:58 BST 2000None

Grid

public class Grid extends JPanel

Fields Summary
Constructors Summary
public Grid()

    setLayout(new GridLayout(3, 2));
    add(new JButton("One"));
    add(new JButton("Two"));
    add(new JButton("Three"));
    add(new JButton("Four"));
    add(new JButton("Five"));
  
Methods Summary
public static voidmain(java.lang.String[] args)

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