title: Java JLabel SetIcon update change the JLabel Zorder
body: <p><img src="https://i.stack.imgur.com/cLy4x.png" alt="enter image description here">
  <img src="https://i.stack.imgur.com/wbdw6.png" alt="enter image description here"></p>
  
  <p>I have two JLabels that I need to put one over the second. The first time the page loaded correctly. I made a button for changing the Icon (JFileChooser) but once validated it changes its ZOrder to come in the front :</p>
  
  <pre><code>    File newI = new File(user.getProfilepic());
      BufferedImage newIBuff;
      try {
          newIBuff = ImageIO.read(newI);
          BufferedImage NewIm = resizeImage(newIBuff, labelpic.getWidth(),        labelpic.getHeight());
          labelpic.setIcon(new ImageIcon(NewIm));
          labelpic.setComponentZOrder(labelpic, 1);
      } catch (IOException e1) {
          // TODO Auto-generated catch block
          e1.printStackTrace();
      }
  </code></pre>