Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

what is pluggable look and feel?  RSS feed

 
mara thamizhan
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey,
i am a newbie to swing programming & i come across a term pluggable look & feel?

may i know plz what is pluggable look & feel with the help of a realtime example?

cheers,
Bye!.
 
Charles Lyons
Author
Ranch Hand
Posts: 836
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pluggable L&F (PLAF) is basically a "skin" system for Swing components - you can change the style of your application by changing its LAF. You can write your own, but the standard runtime also ships with several LAFs.

To see what I mean, use any Swing application you've already got at hand and use this wrapper:Replace the commented "Start Swing code here" line with an initialiser of a Swing application (typically instantiation of a new frame etc.) - preferably an application with lots of components (buttons, windows, menus...).

Now start this with:and you'll get a list of LookAndFeels installed on this system. Choose which one you want to use and restart the program using the appropriate number for the LAF you want to use as the first argument; for example, to use the second on the list (with index 1):Now you'll see what PLAF is and how it works!

If you've got any further questions, please post them.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!