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:
parent
59e4d3664f
commit
793ec9885f
1 changed files with 5 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
package jrummikub.view;
|
package jrummikub.view;
|
||||||
|
|
||||||
import java.awt.BorderLayout;
|
import java.awt.BorderLayout;
|
||||||
|
import java.awt.Color;
|
||||||
import java.awt.Graphics;
|
import java.awt.Graphics;
|
||||||
|
|
||||||
import javax.swing.ImageIcon;
|
import javax.swing.ImageIcon;
|
||||||
|
@ -35,14 +36,17 @@ public class Table extends JPanel implements ITable {
|
||||||
setLayout(new BorderLayout());
|
setLayout(new BorderLayout());
|
||||||
|
|
||||||
leftPlayerLabel = new JLabel();
|
leftPlayerLabel = new JLabel();
|
||||||
|
leftPlayerLabel.setForeground(Color.WHITE);
|
||||||
add(leftPlayerLabel, BorderLayout.WEST);
|
add(leftPlayerLabel, BorderLayout.WEST);
|
||||||
|
|
||||||
topPlayerLabel = new JLabel();
|
topPlayerLabel = new JLabel();
|
||||||
topPlayerLabel.setHorizontalAlignment(JLabel.CENTER);
|
topPlayerLabel.setHorizontalAlignment(JLabel.CENTER);
|
||||||
topPlayerLabel.setHorizontalTextPosition(JLabel.CENTER);
|
topPlayerLabel.setHorizontalTextPosition(JLabel.CENTER);
|
||||||
|
topPlayerLabel.setForeground(Color.WHITE);
|
||||||
add(topPlayerLabel, BorderLayout.NORTH);
|
add(topPlayerLabel, BorderLayout.NORTH);
|
||||||
|
|
||||||
rightPlayerLabel = new JLabel();
|
rightPlayerLabel = new JLabel();
|
||||||
|
rightPlayerLabel.setForeground(Color.WHITE);
|
||||||
add(rightPlayerLabel, BorderLayout.EAST);
|
add(rightPlayerLabel, BorderLayout.EAST);
|
||||||
|
|
||||||
innerPanel = new JPanel();
|
innerPanel = new JPanel();
|
||||||
|
@ -51,7 +55,7 @@ public class Table extends JPanel implements ITable {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void paint(Graphics g) {
|
protected void paintComponent(Graphics g) {
|
||||||
for(int x = 0; x < getWidth(); x += background.getIconWidth()) {
|
for(int x = 0; x < getWidth(); x += background.getIconWidth()) {
|
||||||
for(int y = 0; y < getHeight(); y += background.getIconHeight()) {
|
for(int y = 0; y < getHeight(); y += background.getIconHeight()) {
|
||||||
background.paintIcon(this, g, x, y);
|
background.paintIcon(this, g, x, y);
|
||||||
|
|
Reference in a new issue