2025-01-30 15:58:46 +01:00
|
|
|
import javax.swing.*;
|
|
|
|
import java.awt.*;
|
|
|
|
|
|
|
|
public class Question {
|
|
|
|
public static void main(String[] args){
|
|
|
|
JFrame frame = new JFrame("Question");
|
|
|
|
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
|
|
|
|
|
|
|
frame.setLayout(new BorderLayout());
|
|
|
|
|
2025-02-03 17:22:43 +01:00
|
|
|
JLabel etiquette = new JLabel("Aimez-vous les chats ?", JLabel.CENTER);
|
2025-01-30 15:58:46 +01:00
|
|
|
JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
|
|
|
|
JButton btn1 = new JButton("Oui");
|
|
|
|
JButton btn2 = new JButton("Non");
|
|
|
|
JButton btn3 = new JButton("NSPP");
|
|
|
|
|
|
|
|
buttonPanel.add(btn1);
|
|
|
|
buttonPanel.add(btn2);
|
|
|
|
buttonPanel.add(btn3);
|
|
|
|
|
|
|
|
frame.add(etiquette, BorderLayout.NORTH);
|
|
|
|
frame.add(buttonPanel, BorderLayout.SOUTH);
|
|
|
|
frame.setSize(380,120);
|
|
|
|
frame.setLocation(500,250);
|
|
|
|
frame.setVisible(true);
|
|
|
|
}
|
|
|
|
}
|