27 lines
735 B
Java
27 lines
735 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);
|
|
|
|
JRadioButton gryf = new JRadioButton("Gryffondor");
|
|
JRadioButton serd = new JRadioButton("Serdaigle");
|
|
JRadioButton serp = new JRadioButton("Serpentard");
|
|
|
|
gryf.setHorizontalAlignment(JRadioButton.CENTER);
|
|
serd.setHorizontalAlignment(JRadioButton.CENTER);
|
|
serp.setHorizontalAlignment(JRadioButton.CENTER);
|
|
|
|
frame.add(gryf, BorderLayout.NORTH);
|
|
frame.add(serd, BorderLayout.CENTER);
|
|
frame.add(serp, BorderLayout.SOUTH);
|
|
|
|
|
|
frame.setSize(1000,500);
|
|
frame.setLocation(500,250);
|
|
frame.setVisible(true);
|
|
|
|
}
|
|
} |