{"id":509,"date":"2009-11-06T23:45:24","date_gmt":"2009-11-06T21:45:24","guid":{"rendered":"http:\/\/raftaman.net\/?p=509"},"modified":"2021-05-15T11:46:41","modified_gmt":"2021-05-15T09:46:41","slug":"changing-default-looknfeel-for-netbeans-and-the-gui-builder","status":"publish","type":"post","link":"https:\/\/possiblelossofprecision.net\/?p=509","title":{"rendered":"Changing default Look&#8217;n&#8217;Feel for Netbeans (and the GUI builder)"},"content":{"rendered":"<p>Netbeans&#8217; GUI builder is great. It&#8217;s one of the essential features that made me drop eclipse. <\/p>\n<p>But designing accurate GUIs can be a pain in the arse. Especially, when you use the GUI builder with a certain preview Look and Feel (e.g. GTK+) but you application later runs with a completely different L&#8217;n&#8217;F (e.g. Nimbus). It&#8217;s almost certain, that your design will look rather ugly. Unless you want to design your GUI manually (which isn&#8217;t a bad idea, btw.), you have to make sure, your design preview and application match.<\/p>\n<p>While <a href=\"http:\/\/java.sun.com\/docs\/books\/tutorial\/uiswing\/lookandfeel\/plaf.html\">changing the L&#8217;n&#8217;F<\/a> in your application is quite simple, <a href=\"http:\/\/wiki.netbeans.org\/NBLookAndFeels\">changing Netbeans&#8217; L&#8217;n&#8217;F<\/a> (and therefore the GUI builder&#8217;s L&#8217;n&#8217;F ) is rather tricky. The easiest way is probaly the <code>--laf<\/code> flag:<\/p>\n<pre class=\"brush: plain; light: true; title: ; notranslate\" title=\"\">\r\n$ netbeans --laf Nimbus\r\n<\/pre>\n<p>If you want to start Netbeans in Nimbus-mode per default, just add <code>--laf Nimbus<\/code> to <code>netbeans_default_options<\/code> in <code>~\/.netbeans\/6.5\/etc\/netbeans.conf<\/code>.<\/p>\n<p>If the file doesn&#8217;t yet exists<\/p>\n<pre class=\"brush: plain; light: true; title: ; notranslate\" title=\"\">\r\nmkdir -p ~\/.netbeans\/6.5\/etc\/ \r\necho netbeans_default_options=\\&quot;--laf Nimbus\\&quot; &gt;&gt; ~\/.netbeans\/6.5\/etc\/netbeans.conf\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Netbeans&#8217; GUI builder is great. It&#8217;s one of the essential features that made me drop eclipse. But designing accurate GUIs can be a pain in the arse. Especially, when you use the GUI builder with a certain preview Look and Feel (e.g. GTK+) but you application later runs with a completely different L&#8217;n&#8217;F (e.g. Nimbus). It&#8217;s almost certain, that your&#8230; <a href=\"https:\/\/possiblelossofprecision.net\/?p=509\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[4,24],"class_list":["post-509","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-java","tag-netbeans"],"_links":{"self":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/509","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=509"}],"version-history":[{"count":12,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/509\/revisions"}],"predecessor-version":[{"id":2691,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/509\/revisions\/2691"}],"wp:attachment":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=509"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=509"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=509"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}