New method updateMoveList to fill JScrollPane
parent
d1d85ed428
commit
47591a7264
|
|
@ -145,6 +145,18 @@ public class GameGui {
|
||||||
return statsPanel;
|
return statsPanel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void updateMoveList(List<String> moves) {
|
||||||
|
moveListPanel.removeAll();
|
||||||
|
for (String move : moves) {
|
||||||
|
JLabel moveLabel = new JLabel(move);
|
||||||
|
moveLabel.setForeground(Color.WHITE);
|
||||||
|
moveLabel.setFont(new Font("SansSerif", Font.PLAIN, 18));
|
||||||
|
moveListPanel.add(moveLabel);
|
||||||
|
}
|
||||||
|
moveListPanel.revalidate();
|
||||||
|
moveListPanel.repaint();
|
||||||
|
}
|
||||||
|
|
||||||
public JLabel getField(int row, int col) {
|
public JLabel getField(int row, int col) {
|
||||||
return fields[row][col];
|
return fields[row][col];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue