本文整理汇总了Java中com.jgoodies.looks.windows.WindowsLookAndFeel类的典型用法代码示例。如果您正苦于以下问题:Java WindowsLookAndFeel类的具体用法?Java WindowsLookAndFeel怎么用?Java WindowsLookAndFeel使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
WindowsLookAndFeel类属于com.jgoodies.looks.windows包,在下文中一共展示了WindowsLookAndFeel类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createInstance
import com.jgoodies.looks.windows.WindowsLookAndFeel; //导入依赖的package包/类
public static void createInstance() {
try {
Toolkit.getDefaultToolkit().setDynamicLayout(true);
System.setProperty("sun.awt.noerasebackground","true");
// JGoodies
Options.setDefaultIconSize(new Dimension(16, 16)); // menu icons
Options.setUseNarrowButtons(false);
Options.setPopupDropShadowEnabled(true);
UIManager.setLookAndFeel(System.getProperty("os.name").toLowerCase().startsWith("windows")
? new WindowsLookAndFeel() : new PlasticXPLookAndFeel());
_instance = new MainFrame();
} catch (Exception e) {
System.err.println(e);
}
}
示例2: main
import com.jgoodies.looks.windows.WindowsLookAndFeel; //导入依赖的package包/类
public static void main(final String[] args) {
try {
//UIManager.setLookAndFeel(new com.jgoodies.looks.plastic.Plastic3DLookAndFeel()); // .plastic.Plastic3DLookAndFeel() .windows.WindowsLookAndFeel()
//UIManager.setLookAndFeel("com.jgoodies.looks.plastic.PlasticXPLookAndFeel"); // PlasticXPLookAndFeel Plastic3DLookAndFeel
//UIManager.setLookAndFeel(new Plastic3DLookAndFeel());
UIManager.setLookAndFeel(new WindowsLookAndFeel());
/*
UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
UIManager.put("Table.gridColor", Color.black);
UIManager.put("Table.selectionBackground", Color.white);
UIManager.put("Table.selectionForeground", Color.black);
UIManager.put("Table.focusCellBackground", Color.white);
UIManager.put("Table.focusCellForeground", Color.black);
*/
setUIFont(new javax.swing.plaf.FontUIResource("Tahoma",Font.PLAIN,13));
}
catch (Exception e) {MyLogger.handleException(e);}
System.setProperty("line.separator", "\n"); // Damit RDiff auch funktioniert, sonst haben wir einmal (unter Windows) "\r\n" und bei Linux nur "\n"
go(null);
}