From ebd4178a87dd8bc8a1be1fab66ba4ea78dba39e9 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 28 Apr 2022 13:16:45 +0200 Subject: [PATCH] la mise en page est clean git add * --- FrameJeu.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/FrameJeu.java b/FrameJeu.java index e940559..ec5dd08 100644 --- a/FrameJeu.java +++ b/FrameJeu.java @@ -31,30 +31,30 @@ public class FrameJeu{ Dimension grilleSize= grille.getGrilleSize(); JPanel banniere= new JPanel(); banniere.setBackground(vert); - Dimension banniereSize=new Dimension(grilleSize.width,grilleSize.height/9); + Dimension banniereSize=new Dimension(grilleSize.width,grilleSize.height/10); banniere.setSize(banniereSize); // mise en place de la bannière - miseEnPage.fill = GridBagConstraints.HORIZONTAL; + miseEnPage.fill = GridBagConstraints.BOTH; miseEnPage.gridx = 0; miseEnPage.gridy = 0; - miseEnPage.weightx =banniereSize.width; - miseEnPage.ipady = banniereSize.height; + miseEnPage.weightx =1; + miseEnPage.weighty = 0.1; fenetre.add(banniere, miseEnPage); // Mise en place de la grille //miseEnPage.fill = GridBagConstraints.BOTH; - miseEnPage.anchor = GridBagConstraints.SOUTHEAST; miseEnPage.gridx = 0; miseEnPage.gridy = 1; - miseEnPage.weightx =grilleSize.width; - miseEnPage.ipady = grilleSize.height; + miseEnPage.weightx =1; + miseEnPage.weighty = 0.9; + miseEnPage.fill = GridBagConstraints.BOTH; fenetre.add(grille.getGrille(), miseEnPage); fenetre.pack(); - fenetre.setSize(grilleSize.width,grilleSize.height*10/9); + fenetre.setSize(grilleSize.width,grilleSize.height*11/10); Dimension fenetreSize=fenetre.getSize(); fenetre.setLocation(screenSize.width/2-(fenetreSize.width/2), screenSize.height/2-(fenetreSize.height/2)); //fenetre.setResizable(false);