Loading images from a standard Java Swing library correctly

"Klaus Martinschitz" <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Message-ID <[email protected]>
I solved the problem in the meantime.
It seems to be a problem of case sensitivity.

My icon is named Join_Bevel.png, so large "B" for Bevel.

If I write

Code:

label.setIcon(new ImageIcon(getClass().getResource("/at/netcrystals/crystallography/swing/Join_bevel.png"), "Join bevel"));//NOI18N



Samll "b" for the Term "Join_bevel.png" it works for Java standard project without Netbeans but not in Netbeans.
If I write

Code:

label.setIcon(new ImageIcon(getClass().getResource("/at/netcrystals/crystallography/swing/Join_Bevel.png"), "Join bevel"));//NOI18N



Large "B" for the Term "Join_Bevel.png" it works for Java standard project and in Netbeans.

I reproduced this now severall times and can't understand it. The source code for loading must be the same, or?

Thanks.

Regards,
klaus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.