| |
14. 122. 4. 检索信息UIManager |
|
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());
}
}
|
|
|