Make player labels show again on table

git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@5 72836036-5685-4462-b002-a69064685172
This commit is contained in:
Matthias Schiffer 2011-04-28 15:32:32 +02:00
parent 59e4d3664f
commit 793ec9885f

View file

@ -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);