la mise en page est clean git add *
This commit is contained in:
parent
abe49a58d0
commit
ebd4178a87
@ -31,30 +31,30 @@ public class FrameJeu{
|
|||||||
Dimension grilleSize= grille.getGrilleSize();
|
Dimension grilleSize= grille.getGrilleSize();
|
||||||
JPanel banniere= new JPanel();
|
JPanel banniere= new JPanel();
|
||||||
banniere.setBackground(vert);
|
banniere.setBackground(vert);
|
||||||
Dimension banniereSize=new Dimension(grilleSize.width,grilleSize.height/9);
|
Dimension banniereSize=new Dimension(grilleSize.width,grilleSize.height/10);
|
||||||
banniere.setSize(banniereSize);
|
banniere.setSize(banniereSize);
|
||||||
|
|
||||||
// mise en place de la bannière
|
// mise en place de la bannière
|
||||||
miseEnPage.fill = GridBagConstraints.HORIZONTAL;
|
miseEnPage.fill = GridBagConstraints.BOTH;
|
||||||
miseEnPage.gridx = 0;
|
miseEnPage.gridx = 0;
|
||||||
miseEnPage.gridy = 0;
|
miseEnPage.gridy = 0;
|
||||||
miseEnPage.weightx =banniereSize.width;
|
miseEnPage.weightx =1;
|
||||||
miseEnPage.ipady = banniereSize.height;
|
miseEnPage.weighty = 0.1;
|
||||||
fenetre.add(banniere, miseEnPage);
|
fenetre.add(banniere, miseEnPage);
|
||||||
|
|
||||||
|
|
||||||
// Mise en place de la grille
|
// Mise en place de la grille
|
||||||
//miseEnPage.fill = GridBagConstraints.BOTH;
|
//miseEnPage.fill = GridBagConstraints.BOTH;
|
||||||
miseEnPage.anchor = GridBagConstraints.SOUTHEAST;
|
|
||||||
miseEnPage.gridx = 0;
|
miseEnPage.gridx = 0;
|
||||||
miseEnPage.gridy = 1;
|
miseEnPage.gridy = 1;
|
||||||
miseEnPage.weightx =grilleSize.width;
|
miseEnPage.weightx =1;
|
||||||
miseEnPage.ipady = grilleSize.height;
|
miseEnPage.weighty = 0.9;
|
||||||
|
miseEnPage.fill = GridBagConstraints.BOTH;
|
||||||
fenetre.add(grille.getGrille(), miseEnPage);
|
fenetre.add(grille.getGrille(), miseEnPage);
|
||||||
|
|
||||||
|
|
||||||
fenetre.pack();
|
fenetre.pack();
|
||||||
fenetre.setSize(grilleSize.width,grilleSize.height*10/9);
|
fenetre.setSize(grilleSize.width,grilleSize.height*11/10);
|
||||||
Dimension fenetreSize=fenetre.getSize();
|
Dimension fenetreSize=fenetre.getSize();
|
||||||
fenetre.setLocation(screenSize.width/2-(fenetreSize.width/2), screenSize.height/2-(fenetreSize.height/2));
|
fenetre.setLocation(screenSize.width/2-(fenetreSize.width/2), screenSize.height/2-(fenetreSize.height/2));
|
||||||
//fenetre.setResizable(false);
|
//fenetre.setResizable(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user