diff --git a/src/main/java/de/tilosp/chess/gui/ChessboardGUI.java b/src/main/java/de/tilosp/chess/gui/ChessboardGUI.java index 8cb31e1..800ce41 100644 --- a/src/main/java/de/tilosp/chess/gui/ChessboardGUI.java +++ b/src/main/java/de/tilosp/chess/gui/ChessboardGUI.java @@ -101,7 +101,7 @@ public void componentResized(ComponentEvent e) { sidePanel.add(Box.createVerticalGlue(), BorderLayout.CENTER); - topLabel = new JLabel("White"); + topLabel = new JLabel(); topLabel.setFont(FONT_LABEL); topLabel.setBorder(BORDER_INSERTS); @@ -248,5 +248,6 @@ private void updateIcons() { // update promotion buttons for (int i = 0; i < 4; i++) promotionButtons[i].setEnabled(chessboard.promotion && players[chessboard.playerColor.ordinal()] instanceof LocalPlayer); + topLabel.setText(chessboard.playerColor.toString().toLowerCase()); } }