Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 329799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T09:37:18+00:00 2026-05-12T09:37:18+00:00

I have heard that there are 2 ways that we can set the PLAF

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T09:37:19+00:00Added an answer on May 12, 2026 at 9:37 am

    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:

    //At the beginning of your program
    UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
    //Another option
    UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");
    //And another
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    
    //Or during your program - 
    UIManager.setLookAndFeel(lnfName);
    SwingUtilities.updateComponentTreeUI(frame);
    frame.pack();
    

    The above link also has code examples to demonstrate how to change your look and feel.

    Hope that helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an asp.net dropdownlist control. There are two ways it can be selected.
I have heard that when dealing with mutexes, the necessary memory barriers are handled
I have heard that in C++, using an accessor ( get...() ) in a
I have heard that web-based chat clients tend to use networking frameworks such as
I have heard that GTK covers all controls so that developers do not care
I have heard that DateTime.Now is very expensive call (from here ) Is GETDATE()
I have heard that prepared statements with SQLite should improve performance. I wrote some
I have heard that MSBuild 4.0 has increased Regex parsing support. However, I am
I have heard that MbUnit comes with pretty nice test decorators which allow writing
I have heard that Duplicity is a nice tool for doing incremental backups. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.