ajout rendu pièce suivante
This commit is contained in:
@@ -25,9 +25,10 @@ public class VueControle extends JPanel {
|
||||
nextPiecePanel.setMaximumSize(new Dimension(100, 100));
|
||||
nextPiecePanel.setBackground(Color.LIGHT_GRAY);
|
||||
nextPiecePanel.setAlignmentX(Component.CENTER_ALIGNMENT);
|
||||
initierNextPiecePanel();
|
||||
|
||||
//PAUSE BUTTON
|
||||
pauseButton = new JButton("Pause");
|
||||
pauseButton = new JButton("Pause / Play");
|
||||
pauseButton.setAlignmentX(Component.CENTER_ALIGNMENT);
|
||||
|
||||
add(Box.createVerticalStrut(20)); // Add some space at the top
|
||||
@@ -51,4 +52,17 @@ public class VueControle extends JPanel {
|
||||
public JPanel getNextPiecePanel() {
|
||||
return nextPiecePanel;
|
||||
}
|
||||
|
||||
private void initierNextPiecePanel() {
|
||||
nextPiecePanel.removeAll();
|
||||
nextPiecePanel.setLayout(new GridLayout(4, 4));
|
||||
for (int i = 0; i < 16; i++) {
|
||||
JPanel caseG = new JPanel();
|
||||
caseG.setBorder(BorderFactory.createLineBorder(Color.BLACK));
|
||||
caseG.setBackground(Color.WHITE);
|
||||
nextPiecePanel.add(caseG);
|
||||
}
|
||||
nextPiecePanel.revalidate();
|
||||
nextPiecePanel.repaint();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user