Developpement/23DEV1.1/TPS2/TP01/controle/Menu.java

18 lines
556 B
Java

import javax.swing.*;
import java.awt.*;
public class Menu{
public static void main(String[] args) {
JFrame fenetre = new JFrame("Menu");
fenetre.setSize(1040, 1000);
fenetre.setLocation(0, 0);
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
FlowLayout gestionnaire = new FlowLayout(FlowLayout.CENTER);
fenetre.setLayout(gestionnaire);
for(int i = 0 ; i < args.length ; i++){
JButton boutoninf = new JButton(args[i]);
fenetre.add(boutoninf, BorderLayout.CENTER);
}
fenetre.setVisible(true);
}
}