Results 1 to 4 of 4
Thread: Change the package error
- 09-21-2012, 04:47 PM #1
Member
- Join Date
- Aug 2011
- Posts
- 57
- Rep Power
- 0
Change the package error
Hello,
I have a problem with a class which has the next code.
When i transfer the class to other package in same project, give me the next error.Java Code:initComponents(); ImageIcon winIcon = new ImageIcon(getClass().getResource("images/setinterface.png")); this.setIconImage(winIcon.getImage());
It is something like that cant find the pictures, but the pictures are in the same folder and project.
Java Code:Exception in thread "main" java.lang.NullPointerException at javax.swing.ImageIcon.<init>(ImageIcon.java:205)
An idea
thanks.
- 09-21-2012, 04:57 PM #2
Senior Member
- Join Date
- Oct 2010
- Location
- Germany
- Posts
- 780
- Rep Power
- 4
Re: Change the package error
Smartly load your properties - JavaWorld
Class (Java Platform SE 6)
"/"-separated names; leading "/" indicates absolute names; all other names are relative to the class's package
- 09-21-2012, 05:07 PM #3
Member
- Join Date
- Aug 2011
- Posts
- 57
- Rep Power
- 0
Re: Change the package error
after this if i remove the previous package the class in the package will be work ???
- 09-21-2012, 07:15 PM #4
Similar Threads
-
Compiler runtime package load error
By Dark-Redd in forum Advanced JavaReplies: 17Last Post: 10-09-2011, 09:21 AM -
error with package
By afreaz in forum New To JavaReplies: 20Last Post: 12-16-2010, 06:20 AM -
I got an error message when using package in Textpad
By magicianseeker in forum New To JavaReplies: 5Last Post: 12-09-2010, 03:57 AM -
package does not exist error
By glaze24 in forum New To JavaReplies: 1Last Post: 11-28-2010, 02:03 PM -
why I get error while trying to run a class in a package
By newlifeseattle in forum New To JavaReplies: 4Last Post: 06-01-2010, 07:15 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks