diff --git a/APL2.1/TP2/Choix.class b/APL2.1/TP2/Choix.class new file mode 100644 index 0000000..53e6de0 Binary files /dev/null and b/APL2.1/TP2/Choix.class differ diff --git a/APL2.1/TP2/Choix.java b/APL2.1/TP2/Choix.java new file mode 100644 index 0000000..14f9190 --- /dev/null +++ b/APL2.1/TP2/Choix.java @@ -0,0 +1,24 @@ +import javax.swing.*; +import java.awt.*; + +public class Choix { + public static void main(String[] args) { + JFrame fenetre = new JFrame(); + fenetre.setSize(500,300); + fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + ButtonGroup Cheh = new ButtonGroup(); + JRadioButton bouton8 = new JRadioButton("Gryffondor"); + Cheh.add (bouton8); + fenetre.add(bouton8, BorderLayout.NORTH); + bouton8.setVerticalAlignment(JLabel.CENTER); + JRadioButton bouton9 = new JRadioButton("Serdaigle"); + Cheh.add (bouton9); + fenetre.add(bouton9, BorderLayout.CENTER); + bouton9.setVerticalAlignment(JLabel.CENTER); + JRadioButton bouton10 = new JRadioButton("Serpentard"); + Cheh.add (bouton10); + fenetre.add(bouton10, BorderLayout.SOUTH); + bouton10.setVerticalAlignment(JLabel.CENTER); + fenetre.setVisible(true); + } +} \ No newline at end of file