summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/jrummikub/view/impl/PlayerPanel.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/jrummikub/view/impl/PlayerPanel.java b/src/jrummikub/view/impl/PlayerPanel.java
index b7bdb32..9c12a80 100644
--- a/src/jrummikub/view/impl/PlayerPanel.java
+++ b/src/jrummikub/view/impl/PlayerPanel.java
@@ -1,5 +1,6 @@
package jrummikub.view.impl;
+import java.awt.Color;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@@ -53,7 +54,8 @@ class PlayerPanel extends JPanel implements IPlayerPanel {
/**
* Sets the current player name
*
- * @param playerName the player name
+ * @param playerName
+ * the player name
*/
void setCurrentPlayerName(String playerName) {
currentPlayerNameLabel.setText(playerName);
@@ -64,6 +66,11 @@ class PlayerPanel extends JPanel implements IPlayerPanel {
timeBar.setValue(time);
timeBar.setString(Integer.toString(time / 60) + ":"
+ secondFormat.format(time % 60));
+
+ if (time <= 10)
+ timeBar.setForeground(Color.RED);
+ else
+ timeBar.setForeground(Color.BLACK);
}
@Override