This commit is contained in:
Emmanuel Srivastava
2025-01-30 15:58:46 +01:00
parent b1fa4d63d9
commit 1859f1cb67
9 changed files with 169 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
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());
JLabel etiquette = new JLabel("Aimez-vous les chats ?", SwingConstants.CENTER);
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);
}
}