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. Airflow安装部署
  2. Python-Jenkins助力传统发布流程
  3. Linux 文件和目录的属性及权限
  4. PyTorch 1.8版本!正式支持AMD GPU
  5. 工具的使用——vs2013
  6. github命令记录
  7. 服务器 dell 重装 win7系统,戴尔笔记本重装系统
  8. python保存的快捷键_新手学Python需要知道的Pycharm常用快捷键总结及配置方法
  9. nmn抗衰老是骗局吗,美国nmn骗局,正面解答
  10. opencv python:使用cv2.waitKey(1)控制多个按键
  11. 怎么将手机里的PDF文件转成图片
  12. 台式机:喇叭+麦克风二合一转接头DIY
  13. 回头再说说音乐--江湖笑 周华健
  14. tableau无法建立连接_的Tableau错误连接到本地MySQL数据库
  15. mysql cbo_SparkSQL2.4中启用CBO时JoinReorder分析
  16. 车神(车江毅)的分布式事务资料链接汇总
  17. 下载安装MyEclipse的步骤
  18. echarts 使用仪表盘图展示百分比
  19. 在ACCESS中实现到时提醒功能
  20. 专业显卡打游戏测试软件,通吃游戏和渲染!专业卡和游戏卡实际测试对比

热门文章

  1. WP7页面的数值传递和对象传递
  2. 江翰服务器保护系统(JH-Data Backup server)
  3. WebDriver中的元素状态检测表
  4. StackExchange.Redis 访问封装类
  5. js window.open()实现打印,如何在关闭打印窗口时刷新父窗口
  6. 雅虎公司C#笔试题(之二)
  7. Django项目配置mysql主从数据库实现读写分离
  8. 服务熔断、降级、限流、异步RPC -- HyStrix
  9. mysql select into和insert into select
  10. Redis队列php多线程请求