Originally posted by ankur:
Could u please tell me how can we add image on a frame .
Hi!
You can add an image to a JPanel this way:
1� - create your classe "Piece", that extends JPanel;
2� - Insert in the method paintComponent() the image that u want to display
Example:
Here it's a good link:
Chess Program Written in Java Best regards,
Daniel Botelho