当前位置: 首页>>代码示例>>Java>>正文


Java WindowsLookAndFeel类代码示例

本文整理汇总了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);
	}
}
 
开发者ID:clidev,项目名称:spike.x,代码行数:19,代码来源:MainFrame.java

示例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);
}
 
开发者ID:SiLeBAT,项目名称:BfROpenLab,代码行数:22,代码来源:StartApp.java


注:本文中的com.jgoodies.looks.windows.WindowsLookAndFeel类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。