April 05
Prof. Ismael H. F. Santos -  ismael@tecgraf.puc-rio.br                                                          2
Exemplo de JButton
nJFrame f = new JFrame("Teste");
nf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
nJButton b1 = new JButton("Botão 1");
nJButton b2 = new JButton("Botão 2");
nContainer cp = f.getContentPane();
ncp.setLayout(new GridLayout(1,0));
ncp.add(b1);
ncp.add(b2);
nf.pack();
nf.show();