> java.net.URL url =
> super.getClass().getClassLoader().getResource("$CLASSPATH/resource");
I think you'll find that this works:
java.net.URL url =
getClass().getResource("/resources/resourceName");
...where "resources" is a directory under your classpath (i.e. /resources
in your JAR or ./classes directory) and resourceName is the filename
(without path) of your resource to load.
There's no need to use "super.getClass()" unless your ancestor class is
loaded on a different classloader (unlikely), and that would be crossing
conceptual boundaries anyway.
You don't need to call getClassLoader() either, as Class has methods to
get at resources anyway.
As for your other problem, you are using a Swing layout class that is not
part of the Swing distribution � it is provided by your IDE. Look at the
class name it cannot find, it says it all!
Solution: include the required NetBeans classes in your JAR or don't use
them � use normal Swing/AWT layouts instead. Absolute layouts are usually
a mistake anyway, as they can fall down with different screen
resolutions. Take an hour out to learn how to use GridBagLayout and
GridBagConstraints. Well worth it, and a far better solution.
Marc
==========================================================================To
unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".