change netbeans look and feel

change netbeans look and feel:

方法一:
下载地址:https://kenai.com/projects/nbsubstance/downloads/directory/updates
下载文件:org-sepix-substance.nbm; org-jvnet-lafwidget.nbm;    org-jvnet-substance.nbm;
修改方法:http://softkube.com/blog/changing-the-default-look-and-feel-of-netbeans/

8 Steps to change the default NetBeans Look and Feel
 1.Download the three .nbm files from NetBeans substance look and feel plugin
 2.Open NetBeans. Go to Tools -> Plugins -> Downloaded
 3.Click on Add Plugins and add the three downloaded .nbm files (You have to add them one by one)
 4.Make sure the three files are selected, click Install, and follow through
 5.Restart NetBeans
 6.Go to Tools -> Options -> Miscellaneous -> Look and Feel
 7.Choose your preferred Look and Feel and Restart NetBeans again
 8.Enjoy
 
 方法二:
 根绝jar包来修改netbeans的.conf文件中的设置,具体如下:
 
 A:JTattoo-1.6.9.jar
 准备 JTattoo-1.6.9.jar
 下载地址,改变方法:http://www.jtattoo.net/howto_netbeans.html
 1、Copy the JTattoo.jar file into the XXX/netbeans/platform/lib folder.
 eg: C:\Program Files\NetBeans 7.2.1\platform\lib
 
 2、To change the look of NetBeans you have to edit the netbeans.conf file. You can find this file in
the XXX/netbeans/etc folder where XXX stands for the relative path of your NetBeans installation.
Open this file in a text editor and change the following line:

netbeans_default_options=
"-J-Xms32m -J-Xmx128m -J-XX:PermSize=32m -J-XX:MaxPermSize=96m -J-Xverify:none“
to:
netbeans_default_options=
"-J-Xms32m -J-Xmx128m -J-XX:PermSize=32m -J-XX:MaxPermSize=96m -J-Xverify:none  -laf com.jtattoo.plaf.smart.SmartLookAndFeel"
关于lookAndFeel的选择可以有多种,还例如:com.jtattoo.plaf.texture.TextureLookAndFeel

 

注:可从该网站上(http://www.jtattoo.net/)下载JTattooDemo.jar包,双击运行,是默认的界面设置。
修改jar包的默认选择界面,如com.jtattoo.plaf.texture.TextureLookAndFeel 中的rock 选择,
下载源代码(JTattoo-1.6.9-sources.zip),只需改变:
class JTattooDemo :
  (第207行)public void updateLookAndFeel(String lf):
     com.jtattoo.plaf.texture.TextureLookAndFeel.setTheme("Rock");
  (末尾)public static void main(String args[]):
     com.jtattoo.plaf.texture.TextureLookAndFeel.setTheme("Rock");
     UIManager.setLookAndFeel("com.jtattoo.plaf.texture.TextureLookAndFeel");
class GUIProperties:
  (第43行) private String lookAndFeel = PLAF_TEXTURE;
然后利用eclipse 插件进行打包jar包,再生成的jar包,运行(双击)即使所需的设置界面。

---------------------------------
在该JTattooDemo.jar例中的TextureLookAndFeel中的Rock Theme中的TextureInternalFrameTitlePane
点击和未点击效果一样,为实现点击后的区别于点击前,可做如下修改:
下载JTattoo-1.6.9-sources.zip,重写源代码,再打包。
修改class TextureInternalFrameTitlePane:
 //public void paintPalette(Graphics g)
 public void paintBackground(Graphics g):
  if (isActive()) {
   TextureUtils.fillComponent(g, this,
     TextureUtils.MENUBAR_TEXTURE_TYPE);
  } else {
   TextureUtils.fillComponent(g, this,
     TextureUtils.WINDOW_TEXTURE_TYPE);
  }
 
可以更换效果:TextureUtils.MENUBAR_TEXTURE_TYPE也可更换为其他的icon纹理图片等。
在Eclipse下打包生成jar包:JTattooSource_fat_changed.jar,放入XXX/netbeans/platform/lib folder.
最后netbeans中的etc文件还是做如下修改即可,--laf com.jtattoo.plaf.texture.TextureLookAndFeel 

------------------------
注:
如果想要选择不同的LookAndFeel中的不同主题,如com.jtattoo.plaf.texture.TextureLookAndFeel
如果想设置netbeans成com.jtattoo.plaf.texture.TextureLookAndFeel中的rock主题(默认为default)
则修改package com.jtattoo.plaf.texture;中的class TextureUtils:
 public static void setUpTextures():
    String textureSet = "Rock";
//        if (AbstractLookAndFeel.getTheme() != null) {
//            textureSet = AbstractLookAndFeel.getTheme().getTextureSet();
//        }
再在Eclipse下打包生成jar包:放入XXX/netbeans/platform/lib folder.
netbeans中的etc文件修改,--laf com.jtattoo.plaf.texture.TextureLookAndFeel 
(已验证)
-------------------------------

B:nimrodlf-1.2.jar
参考网址:  http://personales.ya.com/nimrod/download-en.html
准备nimrodlf-1.2.jar
NimROD Look And Feel也是netbeans的一种look and feel
所设置方法和上面一样,首先是添加jar包到netbeans的安装目录(XXX/netbeans/platform/lib)下,
然后修改.conf文件,添加语句为:
-J-Dnimrodlf.themeFile=../DarkTabaco.theme -cp:p nimrodlf.jar --laf com.nilo.plaf.nimrod.NimRODLookAndFeel
重新打开netbeans即可看到界面的改变。

---------------------------------------------
注:
1、Eclipse打包工程成jar包方法:
利用Eclipse的一个第三方插件fatjar生成jar文件,简单方便。
先从网上下载插件(net.sf.fjep.fatjar_0.0.31.jar),网址是:
解压后将它copy到Eclipse plugins文件夹下,此插件就安装成功了。如:D:\Eclipse\eclipse-standard-kepler-SR1-win32\eclipse\plugins
重启Eclipse在项目上右击就会看到多出一个“Build Fat Jar”,在前面有个绿色的“+”号,这时你就可以用此插件打包项目了。
进去后第一个界面Jar-Name里增入要生成的jar文件名,我的是“CAMP_fat.jar”。在Main-Class后点Browse像Export一样它也会列出你项目中的主类,选择后其它默认即可。
Next后会列出你要打包的所有内容,这个插件的优势就是可以将你项目中的外部jar也打进来。
有三个选项,其中Export ANT是生成build.xml脚本文件,方便用户以后修改脚本。
其它两个按钮没用。在这里什么都不点,直接点Finish就可以生成jar文件。


2、修改JRE System Library
如果JRE System Library中存在了不想要的jar包
即需要修改JRE System Library时
如果是直接在C:\Program Files\Java\jdk1.7.0_25\jre\lib\ext
或C:\Program Files\Java\jdk1.7.0_25\jre\lib删除该jar包时,
会出现工程感叹号标志。
此时解决方法是:http://www.cnblogs.com/maoruilin/archive/2012/04/02/eclipsejre.html
Elipse 菜单: Windows | Preferences | Java | Installed JREs
这个界面可以新增或修改可用的JRE(主要是填写JRE name和JRE home):
1)修改JRE
列表中选中要修改的JRE,如Java\jre6,点击Edit...按钮,在弹出的"Edit JRE"对话框重新选择JRE home即可。
2)新增JRE
点击Add...按钮,在弹出的对话框选择Standard VM => Next => 选择JRE home
在选择JRE home的时候,Eclipse会自动填写JRE name,建议不要修改此name(不要出现name和home不匹配,例如name叫jre,但home却是jdk/jre的情况,这样会混淆)!
例:我自己是手动完成引入的:C:\Program Files\Java\jdk1.7.0_25
当Installed JREs列表中存在多个JRE时,可以选中左边的checkbox,使之作为Workspace default JRE(本例为jre6)。
注意:勾选中的JRE只是Workspace default JRE,但实际Project是否选择默认JRE,则取决于Project本身的设置!

剩下的工作就是修改工程的properties中的java bulid path -> libraries

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值