April 05
Prof. Ismael H. F. Santos -  ismael@tecgraf.puc-rio.br                                                          2
Exemplo de JPanel
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");
nJPanel p = new JPanel();
np.add(b1);
np.add(b2);
nf.getContentPane().add(p);
nf.pack();
nf.setVisible(true);
n
nExercícios – Questão 23
n