Get Swing Properties : Look Feel « Swing JFC « Java






Get Swing Properties

 
import javax.swing.JMenu;
import javax.swing.UIManager;

public class GetIt {

  public static void main(String args[]) throws Exception {
    JMenu it = new JMenu();
    String classID = it.getUIClassID();
    System.out.println(classID);
    String className = (String) UIManager.get(classID);
    System.out.println(className);
    Class.forName(className);
    System.out.println(System.getProperty("swing.defaultlaf"));
    System.out.println(System.getProperty("swing.auxiliarylaf"));
    System.out.println(System.getProperty("swing.plaf.multiplexinglaf"));
    System.out.println(System.getProperty("swing.installedlafs"));
  }
}

           
         
  








Related examples in the same category

1.Getting and Setting a Native Look and Feel
2.Retrieve the cross-platform look and feel
3.Default look and feel can be set in a file called 'swing.properties' located in the '/lib' directory.
4.Getting and Setting a Look and Feel
5.Set the look and feel using a system property on the command line
6.Look and feel string
7.Selecting different looks and feels
8.Change the look and feelChange the look and feel
9.A Look-and-feel switcherA Look-and-feel switcher
10.Simple look and feel Example
11.Change Look and feelChange Look and feel
12.Get Installed Look And FeelsGet Installed Look And Feels
13.awt.font.desktophints
14.Highlighted ButtonHighlighted Button