title: Adding an image into a GUI made with Eclipse
body: <p>I'm still pretty new to Java, and in our programming class we are working in a group. My part of the assignment is to insert an image at the top part of the GUI.</p>
  
  <p>this is the code I have so far..</p>
  
  <pre><code>ImageIcon image = new ImageIcon(getClass().getResource("EXTS.png"));
      JPanel.add(image, BorderLayout.NORTH);
  </code></pre>
  
  <p>but right under the .add part of the Jpanel.add is that red squiggly line telling me that I should change my Image to a component and when I do that it tells me to switch it back to an Image?? this is what I'm getting confused on why would it tell me to change it back if it won't use it the way it is now?
  So I guess my question is what should I do to fix this problem?</p>
  
  <p>Also exactly how would I position it, I know it goes into the layout spot in the North but will that be dead center? or does it start from the 0,0 top left and then pixel in?</p>
  
  <p>Thank you in advanced!</p>
  
  <p>(P.s. this is the path to the image file if it should be different please tell me otherwise it's fine -- Project 3/Images/EXTS.png)</p>