I added a napkin library and this code
try { UIManager.setLookAndFeel("net.sourceforge.napkinlaf.NapkinLookAndFeel"); } catch (Exception e) { e.printStackTrace(); }
but I get this exception:
java.lang.ClassNotFoundException: net.sourceforge.napkinlaf.NapkinLookAndFeel
You need to make sure that the jar with this class is in your class path at runtime.
The napkin library is probably not in the class path of your application at runtime.
Verify that you specified "-cp" on the command line when starting the program.
, " ", , ; , , . , JVM , jar - .
Eclipse IDE? , /jar . Eclipse " " ( ) " ".
jar Java . : java -classpath yourjar.jar; napkinlaf.jar yourpackage.YourMainClass
(, , . , jar ...)
Make sure you download the correct version of βLook and Feel Napkinβ .
The version located on the first page of the SourceForge project, unfortunately, is the alpha001 version, which actually has classes hosted in the package napkin. To use it, you need to do the following:
napkin
try { UIManager.setLookAndFeel("napkin.NapkinLookAndFeel"); } catch (Exception e) { e.printStackTrace(); }
Instead, you should go to the Files tab in the SourceForge project and browse to find the latest version.