posted 22 years ago
Im currently working on a chess program. Anyways I just created a custom panel and overriden the painComponent method. Something like this
public class BoardPanel extends JPanel{
public void paintComponent(Graphics g){
super.paintComponent(g);
g.drawImage(Board,0,0,this);
//Add for loop to draw image for each square
g.drawImage(Piece[Col][Row],add math to align piece x, and y);
}
}