I have a class that overrides JFrame I add some JButtons in the constructor.

I also draw an Image in the paint method using

when I run the application the image is drawn on top of the JButtons how can I bring the JButtons to the front of the JFrame.

constructor code

getContentPane().add(new JButton("HI"));

public void paint(Graphics g){