This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Parameters: filename - a String specifying a filename or path
So it is looking for a file with the specified name. If you don't specify a directory (as you did), it will look for the file in the current directory. If you put your file inside a JAR, then it will not find the file.
Have a look at the API documentation for ImageIcon. It has another constructor that takes an URL. You could use that to load the image from a JAR file like this: