25 lines
823 B
Java
25 lines
823 B
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.setLocation(0, 0);
|
|
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
|
|
|
ButtonGroup houses = new ButtonGroup();
|
|
JRadioButton gryffondor = new JRadioButton("Gryffondor");
|
|
JRadioButton serpentard = new JRadioButton("Serpentard");
|
|
JRadioButton serdaigle = new JRadioButton("Serdaigle");
|
|
|
|
houses.add(gryffondor);
|
|
houses.add(serpentard);
|
|
houses.add(serdaigle);
|
|
|
|
fenetre.add(gryffondor, BorderLayout.NORTH);
|
|
fenetre.add(serpentard, BorderLayout.CENTER);
|
|
fenetre.add(serdaigle, BorderLayout.SOUTH);
|
|
fenetre.setVisible(true);
|
|
}
|
|
} |