23 lines
648 B
Java
23 lines
648 B
Java
|
import javax.swing.*;
|
||
|
import java.awt.*;
|
||
|
|
||
|
public class Chien {
|
||
|
public static void main(String[] args) {
|
||
|
|
||
|
JFrame fenetre = new JFrame();
|
||
|
FlowLayout main = new FlowLayout(FlowLayout.CENTER);
|
||
|
fenetre.setLayout(main);
|
||
|
fenetre.setSize(500, 500);
|
||
|
fenetre.setLocation(0, 0);
|
||
|
|
||
|
JLabel question = new JLabel("Aimez-vous les chiens ?");
|
||
|
question.setHorizontalAlignment(JLabel.CENTER);
|
||
|
fenetre.add(question, BorderLayout.CENTER);
|
||
|
fenetre.add(new JButton("Oui"));
|
||
|
fenetre.add(new JButton("Non"));
|
||
|
fenetre.add(new JButton("NSPP"));
|
||
|
|
||
|
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||
|
fenetre.setVisible(true);
|
||
|
}
|
||
|
}
|