Files
DEV/DEV.2.1/TP/TP2-CompGraphique/Choix.java

28 lines
790 B
Java
Raw Normal View History

2025-01-28 15:57:06 +01:00
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");
2025-01-29 21:59:34 +01:00
JRadioButton pouf = new JRadioButton("Poufsouffle");
2025-01-28 15:57:06 +01:00
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);
}
}