Hmmm,
Well I'm assuming you're using JPanel, or extending JPanel and thus using paintComponent(Graphics g) method.
The you draw image using g.drawImage(image,x,y,this);
So to remove the image, I would have some boolean or array that is updated when you press new game, then you can call repaint() on the JPanel object, and if you have some kind of IF statement by the drawImage, you can remove it.
Thats what I would do, how are you actually drawing the images in at the moment?
thank you for the answer..hehe.. what i do on "new game" is.. each time i click on the new game button there would be a new frame, but the dispose() method is not functioning,,

so there are alot of frames..
how can i solve this? i want to close the previous frame..
i put
private static JFrame frame = new JFrame ("TicTacToe");under public class
then:
public void actionPerformed(ActionEvent e){
if (e.getActionCommand().equals("New Game")){
// frame.dispose();//is not working..y?
// frame.setVisible(false);not working also..
JFrame frame = new JFrame("Tic-Tac-Toe");
frame.getContentPane().add (new TicTacToe());
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setResizable(false);
frame.setVisible(true);
frame.pack();
}
after that:
public static void main (String[] args) {
JFrame frame = new JFrame("Tic-Tac-Toe");
frame.getContentPane().add (new TicTacToe());
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setResizable(false);
frame.setVisible(true);
frame.pack();
}
.. im just beginning to learn java

syntax is so hard