I have a set of classes that derive from Node. Most classes have a public static final ImageIcon ICON. I wrote a test to ensure that all nodes have icons.
When it runs I get
Found 56 subclasses of Node
com.marginallyclever.ro3.node.nodes.DHParameter: found
com.marginallyclever.ro3.node.nodes.HingeJoint: found
com.marginallyclever.ro3.node.nodes.LinearJoint: found
com.marginallyclever.ro3.node.nodes.Material: found
com.marginallyclever.ro3.node.nodes.Motor: found
Uncaught error fetching image:
java.lang.NullPointerException: Cannot invoke "java.net.URL.openConnection()" because "this.url" is null
at java.desktop/sun.awt.image.URLImageSource.getConnection(URLImageSource.java:103)
at java.desktop/sun.awt.image.URLImageSource.getDecoder(URLImageSource.java:113)
at java.desktop/sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:263)
at java.desktop/sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:212)
at java.desktop/sun.awt.image.ImageFetcher.run(ImageFetcher.java:176)
iconField.get calls ImageFetcher thread, which hangs instead of throwing something I can catch. So... what do? Code to follow in next post.