title: Java ImageIcon/Icon and JLabel is not working
body: <p>Why is it that my code is not showing the image that I inserted? there's no compilation error or Syntax error  but why is it like that? </p>
  
  <pre><code>import java.awt.FlowLayout;
  import javax.swing.JFrame;
  import javax.swing.JLabel;
  import javax.swing.Icon;
  import javax.swing.ImageIcon;
  import javax.swing.SwingConstants;
  
  public class FirstUI extends JFrame{
  
      private JLabel firstlabel;
      private JLabel secondLabel;
      private JLabel pie;
      public FirstUI(){
          super("Tittle");
          setLayout(new FlowLayout());
          firstlabel = new JLabel("Hello World");
          firstlabel.setToolTipText("Hello World");
  
          String path = "pie.png";
          Icon pie = new ImageIcon(path);
          secondLabel = new JLabel("Text with icon",pie,SwingConstants.LEFT);
          add(secondLabel);
          add(firstlabel);
      }
  }
  </code></pre>
  
  <p>main class</p>
  
  <pre><code>import javax.swing.JFrame;
  public class FirstUiTest {
  
      public static void main(String[] args){
  
           FirstUI MyUI = new FirstUI();
           MyUI.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
           MyUI.setSize(320,280);
           MyUI.setVisible(true);
      }
  }
  </code></pre>