• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to use look and feel api?

 
madhu cm
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello ranchers....

i have downloaded some look and feel api like mac look for my project .
and i dont know how to configure it. if i specify UIManager.setLookAndFeel("path of dir") it gives error as class not found....
And i dont know how to use it. i mean how to put that directory in java home directory? can you plz tell me how to use that api.... should i put that dirctory in javax\swing\plaf\ ? and how to complile that dir.....
plz tell me
 
Dave Brown
Ranch Hand
Posts: 301
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which look and feel are you using ? Did it come in just a jar file or a whole dir of xml/images etc.. if the latter it might be an "l2fprod skin" and not a L&F as the UIManager is expecting.

I've been playing around with these just recently and have made a fairly generic L&F chooser which works with straightforward L&F classes/jGoodies & L2Fprod Skins.
 
madhu cm
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it didnt come with SDK... but i downloaded from javootoo.com... i have found some l&f but i dont know how to use it and where to place that folder and how to complile it..... can you plz tell me how to?
 
Dave Brown
Ranch Hand
Posts: 301
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you tell me which one you downloaded ?
 
madhu cm
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I hava downloaded smoothMetal from javootoo.com.... and i have a folder and i dont know where to place that folder in java home directory...
and how to call that from UIManager ? plz tell me
 
Dave Brown
Ranch Hand
Posts: 301
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You dont need to extract all the folders in the zip, You will only need to use the jar file found in the dist folder. The src is there for reference or for you to change and rebuild the project yourself. So just to get going, ensure the smoothmetal.jar is in your classpath.

Then check the smoothmetal.html file thats in the root directory of the zip for further instructions. for instance, it shows that you can set the L&F with..

UIManager.setLookAndFeel("smooth.metal.SmoothLookAndFeel");

As long as your program can 'see' the smoothmetal.jar the line above will set the look and feel without a problem.

Hope that helps.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!