title: JavaFx Title Bar Image comes up black all the time
body: <p>After researching quite a bit of the posts and trying everything out, I am out of options on my own to do a task as simple as setting an icon on the title bar using eclipse IDE and Java FX 2.</p>
  
  <p>It either comes up with the default empty window icon or comes back black. Please let me know what I am doing wrong.</p>
  
  <p>Here are some of my attempts,</p>
  
  <pre><code>//Image ico = new Image(UI.class.getResourceAsStream("Sunset.jpg"), 16, 16,      true,true);        
  //Image ico = new Image("Sunset.jpg", true);// looks inside src folder
  //primaryStage.getIcons().add(new Image(UI.class.getResourceAsStream("/title.jpeg")));
  //primaryStage.getIcons().add(new Image(UI.class.getResourceAsStream("title.jpeg")));
  
  Image ico = new Image(UI.class.getResourceAsStream("Sunset.jpg"));
  primaryStage.getIcons().add(ico);       
  </code></pre>
  
  <p>I have tried the following with the pictures I have been using,</p>
  
  <ol>
  <li>I used pictures with attributes 300x300 pixels</li>
  <li>I converted pictures which were 300x300 pixels to 16x16 pixels</li>
  <li>I used *.ico with both 32x32 and 16x16 pixels</li>
  <li>I converted .ico into jpeg and tried as well.</li>
  </ol>
  
  <p>Please let me know, how I can overcome this.
  Thanks !</p>
  
  <p><strong>System details:</strong></p>
  
  <p>java.runtime.version - 1.7.0_11-b21<br>
  javafx.runtime.version - 2.2.4-b19<br>
  OS Name - MS Win XP Professional<br>
  OS Version - 5.1.2600 Service Pack 3 Build 2600<br>
  OS architecture - 32 bit<br>
  Graphics card - Intel® HD Graphics<br>
  Graphics card driver – igxpmp32.sys Version 6.14.10.5384</p>