integration du responsive dans l'affichage de la grille

This commit is contained in:
ROGER
2025-05-16 16:17:58 +02:00
parent 9896013173
commit 2fec9fc96e
6 changed files with 220 additions and 26 deletions

View File

@@ -1,5 +1,6 @@
package org.Views;
import org.Models.GridLayoutCarre;
import org.Models.PieceCourante;
import javax.swing.*;
@@ -85,7 +86,11 @@ public class VueBandeauControle extends JPanel {
private void initierNextPiecePanel() {
nextPiecePanel.removeAll();
nextPiecePanel.setLayout(new GridLayout(4, 4));
nextPiecePanel.setLayout(new GridLayoutCarre(4, 4));
Dimension tailleCarre = new Dimension(120, 120);
nextPiecePanel.setPreferredSize(tailleCarre);
nextPiecePanel.setMaximumSize(tailleCarre);
nextPiecePanel.setMinimumSize(tailleCarre);
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
JPanel caseG = new JPanel();
@@ -113,4 +118,6 @@ public class VueBandeauControle extends JPanel {
nextPiecePanel.revalidate();
nextPiecePanel.repaint();
}
}