If Java comes up with the error message like “no main class found” you might have a problem like many many others before (as a google query reveals). Usually, the problem comes from one of the following issues:
(more…)
Tag: NetBeans FAQ
-
No Main Class Found
-
How to use TableModels and ListModel with NetBeans GUI Builder
A default JTable or JList comes with it’s own pre initalized model. Okay – but: how can we modify this model? Which type of model is usually pre initialized?
In the following I’ll just list some of the may possible ways to work with tables and lists and the NetBeans Gui Builder:
(more…) -
How to load images in Java
Every once in a while there is a question on the NetBeans mailinglist about how to load an image (or other ressource, like a text file) relative to the executing JAR.
The Java Tutorial gives the answer in the chapter “How to use Icons“:
java.net.URL imgURL = getClass().getResource("inSamePackage.png"); java.net.URL imgURL = getClass().getResource("/de/foo/otherPackage.png");