I have heard that there are 2 ways that we can set the PLAF in Swing. What is the real meaning of PLAF, and what are those 2 ways?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
PLAF = Pluggable Look and Feel. Basically, the same UI can have different skins with very little work.
Check out this site for a detailed description of L&F. In short, there are actually 3 ways to set up your PLAF.
1) Via command line:
java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel MyApp
or
java -Dswing.defaultlaf=com.sun.java.swing.plaf.windows.WindowsLookAndFeel MyApp
2) Via swing.properties file in your java lib.
swing.defaultlaf=com.sun.java.swing.plaf.windows.WindowsLookAndFeel
3) Programatically with either:
The above link also has code examples to demonstrate how to change your look and feel.
Hope that helps!