Hi
I have problem with JFrames in Java, the program still has a same background color. Please check the program
Code:
class gameFrame extends JFrame implements Runnable { //
public void run(){
paintIt p = new paintIt();
add(p);
}
public gameFrame(){
//paintIt p = new paintIt();
//add(p);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setSize(1000,1500);
setTitle("Image test");
getContentPane().setBackground(Color.WHITE);
setVisible(true);
}
}
Any help or suggestions will be appreciated. Thanks in advance
Bookmarks