aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Look and Feel ?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Look and Feel ??" Watch "Look and Feel ??" New topic
Author

Look and Feel ??

Bikash Paul
Ranch Hand

Joined: Dec 04, 2001
Posts: 342
Hi all friends,
I want to use third parties look and feel package for my swing interface.for that i read in help document on internet that i have to change in swing.properties file which located in '<JAVAHOME>/lib' directory but i couldn't find any swing.properties file.Iam using jdk1.3.0_02.In help document it is written that i have to change below line in swing .prperties file.
swing.defaultlaf=com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Can any one plz guide me how i can do that.Presently Iam doing it by command line execution:-
java -Dswing.defaultlaf=com.incors.plaf.kunststoff.KunststoffLookAndFeel MyApp
Regards
Bikash
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Perhaps you can create that file yourself and Swing will use it? I am not sure... why don't you post the link to the third party L&F you are using?


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Update!

OK... I realized you are using the kunststoff L&F... no need to post the url!

I found out you have to put the swing.properties file in the <JDK_dir>/jre/lib directory, not the <JDK_dir>/lib directory. This worked with the look and feels that came with the JDK... I'm trying to find out now if it supports third party look and feels...
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Third party look and feels work too... you just have to make sure they are on the classpath!
Bikash Paul
Ranch Hand

Joined: Dec 04, 2001
Posts: 342
Hi Pruett,
First of all thanks for ur help.U r right I have to keep swing.properties file in JAVA_HOME/jre/lib directory and that third parties jar file in classpath.Now it is working fine.Iam actually want to give facility to user so that they can use their own Look and Feel as they wish.
Regards
Bikash
[ February 03, 2003: Message edited by: Bikash Paul ]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Look and Feel ??