integration du responsive dans l'affichage de la grille
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user