import javax.swing.*; import java.awt.*; public class Question { public static void main(String[] args) { JFrame fenetre = new JFrame("Damier"); fenetre.setSize(300, 200); fenetre.setLocation(100, 100); fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JLabel question = new JLabel("Aimez-vous les chiens ?", SwingConstants.CENTER); question.setVerticalAlignment(SwingConstants.BOTTOM); JPanel buttonPanel = new JPanel(); JButton yes = new JButton("Oui"); JButton no = new JButton("Non"); JButton noAnswer = new JButton("NSPP"); buttonPanel.add(yes, BorderLayout.CENTER); buttonPanel.add(no, BorderLayout.CENTER); buttonPanel.add(noAnswer, BorderLayout.CENTER); fenetre.add(buttonPanel, BorderLayout.CENTER); fenetre.add(question, BorderLayout.NORTH); fenetre.setVisible(true); } }