modif main

This commit is contained in:
2025-10-19 02:30:54 +02:00
parent 16bfe69c86
commit 29d12bc372
3 changed files with 72 additions and 16 deletions
+43
View File
@@ -0,0 +1,43 @@
// package fr.iutfbleau.papillon;
import javax.swing.*;
import java.awt.*;
public class Main extends JFrame {
public Main(){
super("Papillon");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setSize(400, 150);
Crud crud = new Crud();
JPanel panel = new JPanel(new GridBagLayout());
GridBagConstraints c = new GridBagConstraints();
c.fill = GridBagConstraints.NONE;
c.anchor = GridBagConstraints.WEST;
c.weightx = 1.0;
c.insets = new Insets(4, 4, 4, 4);
c.gridx = 0;
c.gridy = 0;
panel.add(crud.get(0), c);
c.gridx = 0;
c.gridy = 1;
panel.add(crud.get(1), c);
setContentPane(panel);
}
public static void main(String[] args) {
Main f = new Main();
f.setVisible(true);
}
}