title: Trying to bring a JLabel above Paint
body: <p>Been trying to create a program which basically has a background (Which is painted using Paint() ) and then putting a Label with an Image in above that.</p>
  
  <p>Keep getting the JLabel underneath the Paint...</p>
  
  <p>Any ideas?</p>
  
  <p>Thanks a lot in advance.</p>
  
  <hr>
  
  <pre><code>public class GUI extends JFrame {
  
      JPanel menuBar = new JPanel();
      JButton button1 = new JButton("Press Me");
      JLayeredPane layeredPane = new JLayeredPane();
      private ImageIcon image1;
      private static JLabel label1;
  
      public GUI() {
          super("Add a profile");
  
          setLayout(null);
  
          try {
              image1 = new ImageIcon(getClass().getResource(
                      "Images/location.PNG"));
          } catch (Exception e) {
              System.out.println("Image not found!");
          }
          label1 = new JLabel(image1);
          label1.setBounds(new Rectangle(new Point(262, 94), label1.getPreferredSize()));
          label1.setLocation(1, 1);
          label1.setSize(114, 105);
          add(label1);
      }
  
      public void paint(Graphics g) {
          paintComponents(g);
          Graphics2D g2d = (Graphics2D) g;
  
          // Menu Bar
          g2d.setColor(Color.BLACK);
          g2d.drawRect(60, 93, 190, 373);
          g2d.setColor(Color.GRAY);
          g2d.fillRect(61, 94, 189, 372);
  
          // Background box
          g2d.setColor(Color.BLACK);
          g2d.drawRect(281, 106, 560, 360);
          g2d.setColor(Color.GRAY);
          g2d.fillRect(282, 107, 559, 359);
      }
  
      public static void main(String[] args) {
          GUI gui = new GUI();
          gui.setVisible(true);
          gui.setSize(900, 550);
          gui.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          gui.setResizable(false);
          gui.setLocationRelativeTo(null);
  
      }
  </code></pre>
  
  <h2>    }</h2>
  
  <p>Sadly can't get it to work, thanks a bunch anyway
  Oh i didn't see the images you did! Sorry! i'll have a look through now</p>
  
  <p>Really appreciate it all!</p>