Maneesh Godbole wrote:
Most probably your img reference is null.
Run your code from the command line and copy paste your stack trace here.
Sorry for late response.
It is not causing any exception,so there is no trace, as i said earlier program compiles and runs fine.
The problem is, the newly created window does not appear,as if I am using setVisible(false).
Which is not the case.
My package structure is "com.swing.mine". I have kept "icon.gif" in the directory which contains
"com".I tried putting image in "com.swing.mine" too, neither worked.