1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
| package NCCSIGBW;
import java.sql.SQLException;
import javax.swing.*;
import java.awt.*;
public class FenGene extends JFrame
{
//Variable MEF
public static int x[] = {0, 0, 0, 1, 2};
public static int y[] = {0, 1, 2, 2, 2};
public static int l[] = {3, 3, 1, 1, 1};
public static int h[] = {1, 1, 1, 1, 1};
public static int px[] = {0, 0, 70, 5, 25};
public static int py[] = {20, 5, 75, 0, 0};
public FenGene() throws SQLException
{
//Defenition Generales
setTitle ("SIGBW BADGING");
setSize ( 500, 300);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//MEF GRILLE Fenetre
Container contenu = getContentPane();
GridBagLayout g = new GridBagLayout();
contenu.setLayout(g);
GridBagConstraints c = new GridBagConstraints();
c.fill = GridBagConstraints.BOTH;
//REMPLISSAGE DE LA GRILLE
for ( int i = 0; i < x.length; i++)
{
c.gridx=x[i];
c.gridy=y[i];
c.gridwidth=l[i];
c.gridheight=h[i];
c.weightx=px[i];
c.weighty=py[i];
if ( i == 0)
{
//contenu.add(new JButton ("Filtre"), c);
contenu.add(new FenFilt(), c);
}
if ( i == 2)
{
contenu.add(new FenList(), c);
//contenu.add(new PanelList(), c);
}
if ( i == 4)
{
contenu.add(new FenDet(), c);
}
}
}
} |
Partager