title: BG image with Swing without overriding paintComponent
body: <p>I'm currently designing a menu with several screens with multiple buttons on each screen. To use buttons on top of the background image, which is in a jLabel (by default, I can't put buttons on TOP of the jLabel), I used GridBagLayout with two panels/menu screen, one panel containing the buttons (opaque = false) and one panel with the background image, or jLabel. In order to switch the current panels being displayed, depending on where the user is in the menu, I made each menu screen (aka. every 2 panels) in separate methods, not classes.</p>
  
  <p>Now, I've come to the point where I'm working on parts of the interface that are unnecessarily complicated, and I don't feel GridBag will serve my purposes, so I was wondering if there was a different way to draw my background image, still being able to use my buttons on top of the image.</p>
  
  <p>The most popular way I looked up was overriding the paintComponent method, but I can't do that, since I've made my JPanels in separate methods, not classes. They're all contained in my original JFrame.</p>
  
  <p>Help would be greatly appreciated, thank you!</p>
  
  <p>Just added this code, but my background remains white for some reason? Trying the other suggestion right now, thanks guys!</p>
  
  <pre><code>private void mainPanel() {
  
      icon = new ImageIcon(getClass().getResource("/phantasma/menuv1.png"));
  mainContainer1 = new javax.swing.JPanel() {
          @Override
          protected void paintComponent(Graphics g) {
              g.drawImage(icon.getImage(), 0,0, null);
              super.paintComponent(g);
          }
      };
  </code></pre>