title: Layer Images in java
body: <p>Im trying to layer these two images, but only one of them are displaying. Help please :).</p>
  
  <pre><code>public void loadImage() {
  
  
  
             JPanel imgPane = new JPanel();
    img = new JLabel(bg, JLabel.CENTER);
    imgPane.setLayout(new BorderLayout());
    imgPane.add(img);// center
    panel1.add(imgPane, BorderLayout.CENTER);// background image (center)
    gameFrame.add(panel1);
  
  
    JPanel imgPane1 = new JPanel();
  
          img1 = new JLabel(bg1, JLabel.CENTER);
    imgPane1.setLayout(new BorderLayout());
    imgPane1.add(img1);// center
    panel1.add(imgPane1, BorderLayout.CENTER);// background image (center)
    gameFrame.add(panel1);
  
  
   }
  </code></pre>