title: JFrame setComponentZOrder() changes size of the objects
body: <p>I'm trying to write an undecorated JFrame. I'm trying to put my button over my background label. However setting the button's Z order causes the button streches to size of jframe and neither setBounds() nor setSize() changes the situation. Here is my code: </p>
  
  <pre><code>import javax.swing.*;
  
  public class MyApp {
  
      public static void main(String[] args) {
  
          JFrame mainFrame = new JFrame();
          mainFrame.setBounds(0, 112, 100, 50);
          mainFrame.setLayout(null);
          mainFrame.setUndecorated(true);
  
          JLabel lblBackground = new JLabel(new ImageIcon(JFrame.class.getResource("/res/green.png")));
          lblBackground.setBounds(0, 0, 100, 50);
  
          JButton btnStart = new JButton("");
          btnStart.setBounds(5, 15, 10, 15);
  
          mainFrame.add(lblBackground);
          mainFrame.add(btnStart);
          mainFrame.setComponentZOrder(btnStart, 0); 
          mainFrame.setComponentZOrder(btnStart, 1); 
  
  
          mainFrame.setVisible(true);
  
      }   
  }  
  </code></pre>
  
  <p>Thanks for replies.</p>