public class Cadre1 extends JFrame { private JPanel contentPane; private BorderLayout borderLayout1 = new BorderLayout(); private JScrollPane jScrollPane1 = new JScrollPane(); private JPanel jPanel1 = new JPanel(); private JButton jButton1 = new JButton(); private JButton jButton2 = new JButton(); private JButton jButton3 = new JButton(); private JButton jButton4 = new JButton(); private JButton jButton5 = new JButton(); private JButton jButton6 = new JButton(); private VerticalFlowLayout verticalFlowLayout1 = new VerticalFlowLayout(); public Cadre1() { contentPane = (JPanel) this.getContentPane(); contentPane.setLayout(borderLayout1); this.setSize(new Dimension(100, 200)); this.setTitle("Titre du cadre"); jButton1.setText("jButton1"); jButton2.setText("jButton2"); jButton3.setText("jButton3"); jButton4.setText("jButton4"); jButton5.setText("jButton5"); jButton6.setText("jButton6"); jPanel1.setLayout(verticalFlowLayout1); contentPane.add(jScrollPane1, BorderLayout.CENTER); jScrollPane1.getViewport().add(jPanel1, null); jPanel1.add(jButton6, null); jPanel1.add(jButton5, null); jPanel1.add(jButton4, null); jPanel1.add(jButton3, null); jPanel1.add(jButton2, null); jPanel1.add(jButton1, null); } }
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question