aspose file tools*
The moose likes Java in General and the fly likes How do I install JGoodies Look and Feel?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "How do I install JGoodies Look and Feel??" Watch "How do I install JGoodies Look and Feel??" New topic
Author

How do I install JGoodies Look and Feel??

Uris Guerra
Greenhorn

Joined: Feb 16, 2005
Posts: 9
Hi, I'm not a good java programmer, and decided to give it another try. I wanted to install a new look and feel and downloaded one from jgooodies, but can't find any READMe files on how to install look and feel or even their FORMS layout.....Sorry for asking such an easy question....
Lionel Badiou
Ranch Hand

Joined: Jan 06, 2005
Posts: 140
Hello Uris,

1 - Make sure the jar of the look and feel you want to use is in your CLASSPATH
2 - Call javax.swing.UIManager.setLookAndFeel(String) at the very beginning of your application (Note: this call throws exceptions so you must enclosed it with try/catch block).
3 - Look here for details on laf management.

Hope that helps,


Lionel Badiou
CodeFutures Software
Uris Guerra
Greenhorn

Joined: Feb 16, 2005
Posts: 9
Thanks for your help.
I checked out the link and did what you told me to do, but it doesn't work. I think JGoodies should include how to install it in their README file.
When I unpack the file, they have directory with examples. I can run the examples from that directory. But if I copy the example to any other directory, and set the classpath, it doesn't run. It gives me NoClassDefFoundError. I made sure that the jar file is in my classpath.

Thanks for your help. Wanted to try this look and feel because the native look and feel in Linux is too slow and metal is ugghhhhhhhh.
Steven Bell
Ranch Hand

Joined: Dec 29, 2004
Posts: 1071
Not sure if this is the problem, but you need to have the actual jar file in your classpath and not just the folder their in.

The prefered way to set the LnF with JGoodies is

or whichever LnF you want.

This is shown in the README.html > Users Guide > Look and Theme
Uris Guerra
Greenhorn

Joined: Feb 16, 2005
Posts: 9
I do have actuall jar file in my classpath. In fact, I even tried setting it at compile time like this:

java -classpath .;PATH\lib.jar -jar tiny.jar

tiny.jar is a pre-compile example that comes in the zip file. When I unzip the file, and run it from that directory with that command line, it runs perfectly. However, if I copy the sample file to another directory, and try to run it with the same command line, it gives me the previous error.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

When you use the -jar switch, the -classpath switch is ignored. You could say something like

java -classpath .;PATH\lib.jar;PATH\tiny.jar com.foo.Bar

where "com.foo.Bar" is the name of the main class in tiny.jar.


[Jess in Action][AskingGoodQuestions]
Uris Guerra
Greenhorn

Joined: Feb 16, 2005
Posts: 9
Thanks alot Ernest, it worked. It brought a smile to my face when it worked. I've been smashing my head over it for over a day now.
Uris Guerra
Greenhorn

Joined: Feb 16, 2005
Posts: 9
Hey guys, thanks alot for your help. You guys are cool. I had heard about javaranch before but it is the first time I gave it a try. This is one cozy ranch. I hope I get my hands dirty cleaning the pen. ;-)
Bill Goldsworthy
Greenhorn

Joined: Dec 21, 2004
Posts: 27
As a side note, the JGoodies 1.2.2 distribution has instructions here:

looks-1.2.2\docs\guide\index.html

With Look & Feel instructions:

looks-1.2.2\docs\guide\lookandtheme.html


Increasingly, people seem to misinterpret complexity as sophistication, which is baffling - the incomprehensible should cause suspicion rather than admiration. Possibly this trend results from a mistaken belief that using a somewhat mysterious device confers an aura of power on the user. Niklaus Wirth
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do I install JGoodies Look and Feel??