29 lines
1.1 KiB
Java
29 lines
1.1 KiB
Java
import javax.swing.*;
|
|
import java.awt.*;
|
|
|
|
public class Choix {
|
|
public static void main(String[] args) {
|
|
JFrame fenetre = new JFrame();
|
|
fenetre.setSize(500,300);
|
|
fenetre.setMinimumSize(new Dimension(300, 200));
|
|
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
|
ButtonGroup Cheh = new ButtonGroup();
|
|
JRadioButton bouton8 = new JRadioButton("Gryffondor");
|
|
Cheh.add (bouton8);
|
|
fenetre.add(bouton8, BorderLayout.NORTH);
|
|
bouton8.setVerticalAlignment(JLabel.CENTER);
|
|
JRadioButton bouton9 = new JRadioButton("Serdaigle");
|
|
Cheh.add (bouton9);
|
|
fenetre.add(bouton9, BorderLayout.CENTER);
|
|
bouton9.setVerticalAlignment(JLabel.CENTER);
|
|
JRadioButton bouton10 = new JRadioButton("Serpentard");
|
|
Cheh.add (bouton10);
|
|
fenetre.add(bouton10, BorderLayout.SOUTH);
|
|
bouton10.setVerticalAlignment(JLabel.CENTER);
|
|
JRadioButton bouton11 = new JRadioButton("Poufsouffle");
|
|
Cheh.add (bouton11);
|
|
fenetre.add(bouton11, BorderLayout.EAST);
|
|
bouton10.setVerticalAlignment(JLabel.CENTER);
|
|
fenetre.setVisible(true);
|
|
}
|
|
} |