开发者

NetBeans GUI editor skin/theme

开发者 https://www.devze.com 2023-01-19 20:13 出处:网络
I\'m creating a Java Web Applet in NetBeans and I want my final application to have a design called \"Metal\". I can set it, it\'s OK. But when I\'m editing the GUI using \"NetBeans GUI editor\", I mu

I'm creating a Java Web Applet in NetBeans and I want my final application to have a design called "Metal". I can set it, it's OK. But when I'm editing the GUI using "NetBeans GUI editor", I must work with the typical Windows design. Is it possible to use the "Metal" skin in the editor too? Each design has different sizes of buttons, fonts etc. So I'd love to see the final l开发者_如何学Goayout during editing. Not only after compiling.

I know that I can right-click and select "Design preview / Metal" but I do not want this. For ilustration I'm attaching an image:

NetBeans GUI editor skin/theme

I saw this question in a few forums, but nobody understood it well (and nobody answered), so I'm asking my own question.


Try configuring Netbeans to use the Metal look and feel by editing netbeans.conf.

netbeans_default_options="... --laf javax.swing.plaf.metal.MetalLookAndFeel"

Note: After a normal Netbeans installation there's already a netbeans_default_options setting in the configuration file. Be careful not delete them unless you know what you are doing. Just append the --laf option.


1) This question was once answered at Force look and feel on NetBeans 6.5 Please take a look there also.

2) Some years ago I have written a detailed tutorial for Look and Feel changes in NetBeans. Please also have a look at http://netbeanside61.blogspot.com/2008/05/netbeans-ide-look-and-feel.html

with regards
Tushar Joshi, Nagpur


Thanks, it worked. But <snip> caused an error message, so I added to

"netbeans_default_options" only this:

"--laf javax.swing.plaf.metal.MetalLookAndFeel"

Side effect was, that whole NetBeans now have Metal design. But I like it, so why not.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号