title: How to set an icon for a frame in Java?
body: <p>I have used this statement to set icon of a frame:</p>
  
  <pre><code>frame.setIconImage(Toolkit.getDefaultToolkit().getImage("tictactoe.gif"));
  </code></pre>
  
  <p>Unfortunately the frame icon still shows default <code>java</code> icon instead. </p>
  
  <p>How to fix this?</p>