title: JPanel above JLabel using Layered Panes
body: <p>I have a JPanel that contains a bunch of small icons, and a JLabel containing a bigger icon.</p>
  
  <p>First of all, I need clarification on something. By not setting <code>panel.isOpaque</code>, the said <code>panel</code> would have a transparent background and would properly overlap the icons of my JPanel and JLabel. Is this true?</p>
  
  <p>Now to my problem. I've been following the LayeredPanes tutorial on the Oracle website, and I can't seem to make it right on my case.</p>
  
  <pre><code>    JFrame window = new JFrame();
      ImageIcon underIcon;
      URL urlUnder = myClass.class.getResource("images/underImage.gif");
      underIcon = new ImageIcon(urlUnder);
      JLabel labelUnder = new JLabel(underIcon);
  
      ImageIcon panelIcon;
      URL urlAbove = myClass.class.getResource("images/aboveImage.gif");
      panelIcon = new ImageIcon(urlAbove);
      JLabel aboveIcon1 = new JLabel(panelIcon);
      JLabel aboveIcon2 = new JLabel(panelIcon);
  
      JPanel panelAbove = new JPanel(new BorderLayout());
      panelAbove.setOpaque(false);
      panelAbove.add(aboveIcon1, BorderLayout.WEST);
      panelAbove.add(aboveIcon2, BorderLayout.EAST);
  
      JLayeredPane layeredPane = new JLayeredPane();
  
      layeredPane.setLayout(new BorderLayout());
  
      layeredPane.add(labelUnder, BorderLayout.CENTER, 1);
      layeredPane.add(panelAbove, BorderLayout.CENTER, 2);
  
      layeredPane.setOpaque(true);
  
      window.setContentPane(layeredPane);
  
      window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      window.pack();
      window.setVisible(true);
  </code></pre>
  
  <p>I only see the contents of the panel. And I'm 100% sure the images are there on <code>getResource</code>, so that's not the issue. Please advice on how to properly use Layered Panes.</p>