Unable to change icon image for JFrame

Im not sure why but Im attempting to change an icon image for a JFrame (the one in the top left corner) but its not working at all. Im using the following code:

import javax.swing.ImageIcon;

import javax.swing.JFrame;

import java.awt.Dimension;

import java.awt.Image;

import java.awt.Toolkit;

publicclass TestUpperIcon{

publicstaticvoid main(String []args){

JFrame frame =new JFrame("Test");

frame.setPreferredSize(new Dimension(200, 200));

frame.pack();

Image img = Toolkit.getDefaultToolkit().getImage("proem-icon1.gif");

frame.setIconImage(img);

frame.setVisible(true);

}

}

Unfortunately just the default icon is displayed.

Any help please?

[1341 byte] By [JOzzieTa] at [2007-11-26 18:22:15]
# 1
This problem is solved. Sorry think I had the icon in the wrong directory.
JOzzieTa at 2007-7-9 5:56:09 > top of Java-index,Desktop,Core GUI APIs...
# 2
Oh I was gonna post but you solvedCheers.Jason.Message was edited by: fireman.sparkey
fireman.sparkeya at 2007-7-9 5:56:09 > top of Java-index,Desktop,Core GUI APIs...