How to put a JFrame icon
===

I want to set an icon for my application in Java. I'm using Eclipse.

I don't know if the way of storing the icon (and the config file by the way) into the project is the best one (I accept suggestions to learn the best way).

Anyway I'm trying to use this line into my extended JFrame class:


    setIconImage(Toolkit.getDefaultToolkit().getImage("img/icon.png"));

But doesn't work: still with the coffee cup icon.

How can I access to the icon into package estacionBase.img? Is there a better place to store it? How would I access it then?

![enter image description here][1]


  [1]: http://i.stack.imgur.com/MPqGG.png