Okey I am making a simple chess program as an assignment and I ran into a few problems
I coded a file called ChessPiece which is the Base class of all the chess Piece
eg King ,Queen and etc...
We have to create a interface class call ChessPaint that draw the picture of the chess piece ( we are given the pictures)
So I did
public ChessPiece implements ChessPaint()
{
.... other methods there
public void paint(Graphics2D g)
{
things goes in here
}
}
public interface ChessPaint
{
public void paint(Graphics2D g);
}
So I created another class call set ChessSet that set it to a default position.
public ChessSet implements JComponent
{
.... method goes in here
pubic void paint (Graphic g)
{
so i can print the damn pictures
}
}
and the JFrame Code
Construct the ChesseSet and it is suppose to call the paint function automatically but it doesn't it just print and empty JFrame
Any one got any idea what is wrong with this? This is driving me nuts