Developpement/23DEV1.1/TPS2/TP01/MiseEnPage/Question.java

26 lines
821 B
Java

import javax.swing.*;
import java.awt.*;
public class Question{
public static void main(String[] args)
{
JFrame fenetre = new JFrame();
fenetre.setSize(1040, 1000);
fenetre.setLocation(0, 0);
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
GridLayout texte = new GridLayout(3, 5);
fenetre.setLayout(texte);
FlowLayout bouton = new FlowLayout(FlowLayout.CENTER);
fenetre.setLayout(bouton);
JLabel etiquette = new JLabel("Aimez-vous les chiens ?");
etiquette.setHorizontalAlignment(JLabel.CENTER);
JPanel panneau = new JPanel();
JButton b = new JButton("Oui");
JButton b2 = new JButton("Non");
JButton b3 = new JButton("NSPP");
fenetre.add(texte, BorderLayout.NORTH);
fenetre.add(bouton, BorderLayout.CENTER);
fenetre.setVisible(true);
}
}