33 lines
916 B
Java
33 lines
916 B
Java
import javax.swing.*;
|
|
import java.awt.*;
|
|
|
|
public class Choix {
|
|
public static void main(String[] args){
|
|
JFrame frame = new JFrame("Choix");
|
|
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
|
|
|
GridLayout gestionnaire = new GridLayout(4, 1);
|
|
frame.setLayout(gestionnaire);
|
|
|
|
|
|
JRadioButton gryf = new JRadioButton("Gryffondor");
|
|
JRadioButton serd = new JRadioButton("Serdaigle");
|
|
JRadioButton serp = new JRadioButton("Serpentard");
|
|
JRadioButton pouf = new JRadioButton("Poufsouffle");
|
|
|
|
gryf.setHorizontalAlignment(JRadioButton.CENTER);
|
|
serd.setHorizontalAlignment(JRadioButton.CENTER);
|
|
serp.setHorizontalAlignment(JRadioButton.CENTER);
|
|
pouf.setHorizontalAlignment(JRadioButton.CENTER);
|
|
|
|
frame.add(gryf);
|
|
frame.add(serd);
|
|
frame.add(serp);
|
|
frame.add(pouf);
|
|
|
|
frame.setSize(1000,500);
|
|
frame.setLocation(500,250);
|
|
frame.setVisible(true);
|
|
|
|
}
|
|
} |