From 793ec9885fc7f90d5188bc79c09865919c7a5582 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 28 Apr 2011 15:32:32 +0200 Subject: Make player labels show again on table git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@5 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/view/Table.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/jrummikub/view/Table.java b/src/jrummikub/view/Table.java index aaa1068..f1197b7 100644 --- a/src/jrummikub/view/Table.java +++ b/src/jrummikub/view/Table.java @@ -1,6 +1,7 @@ package jrummikub.view; import java.awt.BorderLayout; +import java.awt.Color; import java.awt.Graphics; import javax.swing.ImageIcon; @@ -35,14 +36,17 @@ public class Table extends JPanel implements ITable { setLayout(new BorderLayout()); leftPlayerLabel = new JLabel(); + leftPlayerLabel.setForeground(Color.WHITE); add(leftPlayerLabel, BorderLayout.WEST); topPlayerLabel = new JLabel(); topPlayerLabel.setHorizontalAlignment(JLabel.CENTER); topPlayerLabel.setHorizontalTextPosition(JLabel.CENTER); + topPlayerLabel.setForeground(Color.WHITE); add(topPlayerLabel, BorderLayout.NORTH); rightPlayerLabel = new JLabel(); + rightPlayerLabel.setForeground(Color.WHITE); add(rightPlayerLabel, BorderLayout.EAST); innerPanel = new JPanel(); @@ -51,7 +55,7 @@ public class Table extends JPanel implements ITable { } @Override - public void paint(Graphics g) { + protected void paintComponent(Graphics g) { for(int x = 0; x < getWidth(); x += background.getIconWidth()) { for(int y = 0; y < getHeight(); y += background.getIconHeight()) { background.paintIcon(this, g, x, y); -- cgit v1.2.3