title: How do I load images in Jframe java(eclipse)?
body: <p>I have an paneel.java file which looks like the following code:</p>
  <pre><code>import java.awt.*;
  import javax.swing.*;
  
  public class Paneel extends JFrame
  {
      public static void main ( String [] args )
      {
          // frame
          JFrame frame = new Paneel();
          frame.setSize ( 1000, 1000 );
          frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
          frame.setTitle( &quot;Remembory&quot; );
          frame.setVisible( true );
      }
      
      class Gifpaneel extends JPanel{
          private ImageIcon gif, animatedGif;
          
          public Gifpaneel() {
              gif = new ImageIcon( &quot;test.gif&quot; );
              animatedGif = new ImageIcon( &quot;animaties/test.gif&quot; );
          }       
          
          public void paintComponent( Graphics g ){
              super.paintComponent( g );
              
              gif.paintIcon( this, g, 100, 100 );
              animatedGif.paintIcon ( this, g, 250, 100 );
          }
          
      }
  }
  </code></pre>
  <p>I would like to show the test.gif file.
  How do I get this done? because when I run it in eclipse I only get the jframe with no image in it.</p>