After over 70 postings on the forum
you should know how to use the "code formatting tags" so the code you post is formatted and readable.
You need to change the background of the content pane, not the JFrame.
Read the section from the Swing tutorial on
Custom Painting for the proper way to do this. You should NOT override the paint() method.