Here you can find the source of getSortedInstalledLAFInfos()
public static LookAndFeelInfo[] getSortedInstalledLAFInfos()
//package com.java2s; //License from project: Apache License import java.util.Arrays; import java.util.Comparator; import javax.swing.UIManager; import javax.swing.UIManager.LookAndFeelInfo; public class Main { /**//from w w w .jav a 2 s.c om * Returns the installed LAF info array sorted by my preference. * @return the installed LAF info array sorted by my preference */ public static LookAndFeelInfo[] getSortedInstalledLAFInfos() { final LookAndFeelInfo[] installedLookAndFeels = UIManager.getInstalledLookAndFeels(); Arrays.sort(installedLookAndFeels, new Comparator<LookAndFeelInfo>() { // What we want to prioritize: final String[] lafNamesInOrder = new String[] { "Nimbus", "Metal", "Windows", "Squareness", "Office 2003", "Office XP", "Visual Studio 2005" }; @Override public int compare(final LookAndFeelInfo l1, final LookAndFeelInfo l2) { for (final String lafName : lafNamesInOrder) { if (lafName.equals(l1.getName())) return -1; if (lafName.equals(l2.getName())) return 1; } return 0; // The rest is good as is. } }); return installedLookAndFeels; } }