Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Look and Feel ??

 
Bikash Paul
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Third party look and feels work too... you just have to make sure they are on the classpath!
 
Bikash Paul
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic