Nimbus is the name of a look-and-feel designed by Sun for the Java Desktop System; it’s implemented as a GTK theme in the latest Solaris 11 pre-release builds. In 2007, this project was started by Sun’s Swing Team and Ben Galbraith to build a pure Java implementation of this look and feel under a opensource licence. Later on it was decided to pull Nimbus LAF in to the core of the Java platform as part of version 6u10. Nimbus is now available in the beta version of 6u10 available at http://download.java.net/jdk6/.

The version in the JDK took some of the concepts that were experimented with in the project but is a complete new codebase. It is still based on Synth LAF but is 100% pure vector based using no images. This project is dead for the time being until Nimbus is made opensource through Open JDK. Once that happens it might be pulled back into the project so that we can work on a backport jar that could run on older Java versions than 6u10.

Nimbus is a new cross-platform Swing look & feel, which packs many features and enhancements. It is not just another look and feel but with some exciting features:2D VectorAll of Nimbus is rendered with 2D vector graphics, there is not one image even for all the icons. This means that the whole of Nimbus is just 56k as a packed JAR which is pretty impressive for a whole rich look and feel.High DPI ReadyAs the whole of Nimbus is drawn with shapes and gradients it can be scaled to any resolution.Based on PaintersAll painting for components is done with simple stateless implementations of the Painter interface. These painters are stored in the UIDefaults table so they can be replaced if you would like to change the look of components or can be used in your own components if you would like to create a custom table header for example that looks the same as the standard Nimbus one plus something extra.CustomizableAll colors, icons and fonts are derived off UIDefaults keys so the whole UI can be customized by changing values in the UIDefaults table.Easy to skin 3rd party components to fit inAll of the colors, fonts, icons, borders and painters are exposed through the UIDefaults table which means they are available to your 3rd party components to help you skin them in a Nimbus style.

Usage

To use the Nimbus Look & Feel, simply call the setLookAndFeel methods from UIManager:try {

UIManager.setLookAndFeel(

"com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");

} catch (UnsupportedLookAndFeelException e) {

// handle exception

} catch (ClassNotFoundException e) {

// handle exception

} catch (InstantiationException e) {

// handle exception

} catch (IllegalAccessException e) {

// handle exception

}

Alternatively, you can either specify the L&F from swing.properties file or from a command line. To use the swing.properties files, specify the swing.defaultlaf property. The file (if exists) is located under \lib:# Swing properties

swing.defaultlaf=com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel

To specify the L&F from command line, use the following when running your Java application:

-Dswing.defaultlaf=com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel

From: http://javaforweb.wordpress.com/2008/05/05/nimbus-a-new-look-and-feel-for-swing/

nimbus java_Java:Swing使用Nimbus皮肤相关推荐

  1. storm启动nimbus源码分析-nimbus.clj

    storm启动nimbus源码分析-nimbus.clj nimbus是storm集群的"控制器",是storm集群的重要组成部分.我们可以通用执行bin/storm nimbus ...

  2. Nimbus二storm启动nimbus源码分析-nimbus.clj

    nimbus是storm集群的"控制器",是storm集群的重要组成部分.我们可以通用执行bin/storm nimbus >/dev/null 2>&1 &a ...

  3. nimbus java_Java程序设置界面为Nimbus风格x

    一般用Eclipse开发的软件在windows上运行界面比较难看,如图所示: 解决办法是在 static main()函数中添加程序语句,改变当前界面风格,本文添加风格为Nimbus风格,代码如下: ...

  4. myEclipse破解工具run.bat一闪而过 报错信息com.sun.java.swing. plaf.nimbus.NimbusLookAndFeel

    问题:运行破解myEclipse工具run.bat时,一闪而过 定位问题:很多时候窗口其实都提供了报错信息,但是由于此时运行结束,窗口会立马关闭.要想看到报错信息,那么右击该文件,点击编辑,再程序最后 ...

  5. 大鱼吃豆子游戏java_java swing开发简单的大鱼吃豆子小游戏,可用于毕业设计(附详细设计文档)...

    /** * @(#)fish.BigMouthFish.java 2008-7-31 * Copy Right Information: Tarena * Project: fish * JDK ve ...

  6. 喜羊羊与灰太狼java_java swing实现喜羊羊与灰太狼推箱子游戏附带视频开发教程...

    <p style="font-family:" font-size:15px;text-indent:2em;color:#555555;background-color:# ...

  7. swing中使用皮肤包

    1.将皮肤jar包导入项目中 2.找到皮肤类,一般是以LookAndFeel结尾的类就是皮肤类 3.在程序入口处,使用下面的代码进行添加皮肤效果: public static void main(St ...

  8. frame单选Java_Java Swing JRadioButton:单选按钮组件

    单选按钮与复选框类似都有两种状态,不同的是一组单选按钮中只能有一个处于选中状态.Swing 中 JRadioButton 类实现单选按钮,它与 JCheckBox 一样都是从 JToggleButto ...

  9. keystroke java_Java Swing 快捷键

    Java  Swing 快捷键 给Java Swing编程中按钮或者其他组件事件添加快捷键的方法: Component.setAccelerator(KeyStroke.getKeyStroke('Q ...

最新文章

  1. 数据库链接池终于搞对了,这次直接从100ms优化到3ms!
  2. 查看oracle当前消耗,查找Oracle高消耗语句的方法
  3. 回顾以前的线程安全的类
  4. 教你打造一个Android组件化开发框架
  5. java多表查询实体接收_java - 如何创建Criteria Builder查询以连接具有一对一和多对一实体关系的三个表? - 堆栈内存溢出...
  6. 关于WDM驱动开发的不错资料(来自codeproject)
  7. kafka的offset笔记
  8. 关于单片机串口发送和接收的问题
  9. 3.0-rsync格式
  10. Asp.net对http request 处理的全过程!
  11. java中Map,List与Set的区别
  12. 最优化 | 二次规划的基础知识理论 | 例题讲解
  13. 智安网络丨漫画人工智能:人工智能简史
  14. 3650m5设置u盘启动_联想启天M425台式机设置u盘启动两种模式(支持uefi/bios双启动)...
  15. myeclipse删除jar时出错,无法删除怎么办
  16. 《面膜行业网络关注度分析报告》
  17. ECharts3D地图(详细示例——附有具体注释)
  18. 第十二章:email-mailbox:管理email归档-imaplib:IMAP4客户库-变种
  19. okhttp的视频下载
  20. 金额数字3位隔开php,PHP实现人民币数字格式化,每三位加逗号

热门文章

  1. Spring JdbcTemplate batchUpdate() 实例
  2. Entity Framework在WCF中序列化的问题
  3. PHP用支付宝沙箱账号测试支付功能
  4. 微信web开发者工具调试
  5. Linux的/etc/init.d:用service命令可执行init.d目录中相应服务的脚本
  6. PHP数组推入弹出的函数:头进头出array_unshift/array_shift 尾进尾出array_push/array_pop
  7. python效率提升_Python GUI开发,效率提升10倍的方法!
  8. python scatter参数详解_python matplotlib.scatter 用法
  9. NANUI能否运行在linux,Nanui 项目示例
  10. oracle redo删除,意外删除redo的恢复