Developpement/23DEV1.1/TPS2/TP01/ComposantsGraphiques/Choix.java

18 lines
594 B
Java
Raw Permalink Normal View History

2024-12-09 11:53:11 +01:00
import javax.swing.*;
import java.awt.*;
public class Choix {
public static void main(String[] args) {
JFrame fenetre = new JFrame();
fenetre.setSize(1040, 1000);
fenetre.setLocation(0, 0);
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JRadioButton gri = new JRadioButton("Gryffondor");
JRadioButton ser = new JRadioButton("Serpentard");
JRadioButton serd = new JRadioButton("Serdaigle");
fenetre.add(gri, BorderLayout.NORTH);
fenetre.add(ser, BorderLayout.CENTER);
fenetre.add(serd, BorderLayout.SOUTH);
fenetre.setVisible(true);
}
}