From 47e6f3b0a467a82e491b3fdd1972c03160bb6ab4 Mon Sep 17 00:00:00 2001 From: Vieira Date: Mon, 7 Feb 2022 11:05:59 +0100 Subject: [PATCH] Java --- APL2.1/TP2/Choix.class | Bin 0 -> 946 bytes APL2.1/TP2/Choix.java | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 APL2.1/TP2/Choix.class create mode 100644 APL2.1/TP2/Choix.java diff --git a/APL2.1/TP2/Choix.class b/APL2.1/TP2/Choix.class new file mode 100644 index 0000000000000000000000000000000000000000..53e6de0046b1edb125fe5a97c431002c21d649e7 GIT binary patch literal 946 zcmZuvTTc@~6#k~&?QWNHX`w*90bX0$QZIM|1fdE6DU-&2%eZqW{U4 zl1SnY@F(~?d^VohdLhPrID6)N-?@Be=If8oUjWSGse=hjTbOYW!L&A4wYg^Dx`UWT zZrHf#z{V|o&RWRXnAMcLg@TS3ZOqvy*|=@vjt1^pxMyLWA+{tv87wnIv$LpE5;;7K#Vbr^OoCkde;*f4x!eQs=2Y`g@P7wN9XTJ?JkayoTJb zd@aB1x7xl(Q!k#Y*&it{zQb^I%Z-`PH_;`lM-YKG$e3E@nvO*6=KGuVI zh8TsdmuIl|Qt?wb+l68e1NmZVu!o^yw1<%pN)ohS6f%YeGe#;!XvX*hk80Q~WXupY zQ)3!7HJqo6^xqk`kP0WYVUcH(yf~)dAcq0WLBGvGdMQJAj$ypO2&zb8kC-k-afmS} Sq;X7Z`9PTrSEyD5Q$GRj+0Ehr literal 0 HcmV?d00001 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