modif main
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user