1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
public ModifierFichierParametres(){
super();
initPanels();
setModal(true);//Pour que la JDialog soit toujours au premier plan
//Centrer la JDialog à l'écran
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
this.setLocation(dim.width/2 - getWidth()/2, dim.height/2 - getHeight()/2 );
this.setSize(400,400);//Fixer la taille de la JDialog
getContentPane().setLayout(new GridBagLayout());
GridBagConstraints c = new GridBagConstraints();
c.fill = GridBagConstraints.VERTICAL;
c.anchor = GridBagConstraints.CENTER;
c.gridx = 0;
c.gridy = 0;
getContentPane().add(getGlobalPanel(),c);
c.gridx = 0;
c.gridy = 1;
getContentPane().add(getButtonPanel(),c);
} |
Partager