import javax.swing.*; import java.awt.*; public class Boutons { public static void main(String[] args) { JFrame fenetre = new JFrame(); JPanel pan = new JPanel(); fenetre.setSize(400, 200); fenetre.setLocation(0, 0); fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JButton bouton1 = new JButton(); JButton bouton2 = new JButton(); JButton bouton3 = new JButton(); JButton bouton4 = new JButton(); JButton bouton5 = new JButton(); pan.add(bouton1); pan.add(bouton2); pan.add(bouton3); pan.add(bouton4); pan.add(bouton5); fenetre.setContentPane(pan); fenetre.setVisible(true); } }