Retrieve information of all available UIManager defaults : UI « Swing JFC « Java






Retrieve information of all available UIManager defaults

  

import javax.swing.LookAndFeel;
import javax.swing.UIManager;

public class Main {
  public static void main(String[] args) {
    System.out.println("  " + UIManager.getLookAndFeel().getName());

    UIManager.LookAndFeelInfo[] inst = UIManager.getInstalledLookAndFeels();
    for (int i = 0; i < inst.length; i++) {
      System.out.println("  " + inst[i].getName());
    }

    LookAndFeel[] aux = UIManager.getAuxiliaryLookAndFeels();
    if (aux != null) {
      for (int i = 0; i < aux.length; i++) {
        System.out.println("  " + aux[i].getName());
      }
    } else {
      System.out.println("  <NONE>");
    }
    System.out.println("  " + UIManager.getCrossPlatformLookAndFeelClassName());
    System.out.println("  " + UIManager.getSystemLookAndFeelClassName());
  }
}

   
    
  








Related examples in the same category

1.Setting a UI Default Value That Is Created When Fetched
2.Getting the Default Values for a Look and Feel
3.Setting a UI Default Value That Is Created at Every Fetch
4.Replaces the standard scrollbar UI with a custom oneReplaces the standard scrollbar UI with a custom one
5.UIManager defaultsUIManager defaults
6.Get default values for Swing-based user interface
7.How to change the look and feel of Swing applications
8.UIManager resources to tweak the look of applicationsUIManager resources to tweak the look of applications
9.Displays the contents of the UIDefaults hash map for the current look and feel.