title: Set Icon Image JFrame
body: <p>I have a <code>.ico</code> file I want to use as the title icon for my program. I'm pretty sure I have to use the <code>setIconImage(image)</code> method but every way I've tried doing this has ended in failure.</p>
  
  <p>I've tried quite a few different methods but none have worked for me. One I thought would have worked was the following:</p>
  
  <pre><code>    Image image = new ImageIcon(this.getClass().getResource("Icon.ico").getImage());
      setIconImage(image);
  </code></pre>
  
  <p>Only problem with this however is the type mismatch. Both the main class and the icon are in the same package but I can't seem to set it no matter how hard I try.</p>
  
  <p>What would be the correct method for doing this?</p>