blob: b73b00a980a70d1e01c6616f4e1d3f139a4d404a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
package jrummikub.view;
import java.awt.Color;
import java.awt.Graphics;
import javax.swing.ImageIcon;
import javax.swing.JPanel;
@SuppressWarnings("serial")
public class Board extends JPanel implements IBoard {
private final static ImageIcon background = new ImageIcon(Board.class.getResource("resource/wood.png"));
Board() {
super(true);
setBorder(new CustomBorder(Color.DARK_GRAY, 0, 1, 0, 1));
}
@Override
protected void paintComponent(Graphics g) {
for(int x = 0; x < getWidth(); x += background.getIconWidth()) {
background.paintIcon(this, g, x, 0);
}
// TODO Rest of painting code
}
}
|