update
This commit is contained in:
33
DEV.2.1/TP/TP3-MiseenPage/Choix.java
Normal file
33
DEV.2.1/TP/TP3-MiseenPage/Choix.java
Normal file
@@ -0,0 +1,33 @@
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user