update
This commit is contained in:
27
DEV.2.1/TP/TP3-MiseenPage/Question.java
Normal file
27
DEV.2.1/TP/TP3-MiseenPage/Question.java
Normal 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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user