I draw an image which is my background image, everything is fine but when I'm trying to add some JButtons to the frame the whole business goes wrong the picture that I drew disappear and I see the original background.
The picture drawing looks like that:
public void paint(Graphics g){
g.drawImage(bg, 0, 0, null);
}
I guess my problem is something with the paint method, need to be mentioned that I'm extending the JFrame class.
edit: Here are some pictures to demonstrate what I mean.
It first draw my image:
And when I move my mouse to the place that my buttons should have been drew, that's what I get: