Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this questionConsider the screenshot above of a standard Netbeans Install on a standard Ubuntu 10.10 distribution. Notice the following:
- The main menu-bar fonts are not consistent with the rest of the system.
- Drop down menus do not have frames (This is very noticeable from the File menu)
- The "grayed out" menus are "embossed", not grayed out.
- The keyboard short-cuts are unreadable unless you actually hover over the menu.
- The editor fonts are ugly.
I'm using the latest Java(TM) SE Runtime Environment (build 1.6.0_25-b06), 64 bit from sun/oracle installed in /opt/... My netbeans_jdkhome points to the correct JDK installed in /opt/, which java points to the correct java in the JDSK as I added a profile to /etc/profile.d. The system is AMD 64 bit Ubuntu 10.10 install. The Default Ambiance theme is used开发者_开发百科, switching to Clearlooks fixes some of the issues at the cost of screwing the L&F of everything else, not a solution...
--laf Nimbus works as expected, fonts are still unusable, not a solution, especially as I'm developing NB Platform apps and L&F is important.
I have none of these issues on Fedora 13 with Netbeans 7.0.
The best I can do currently is with the Nimbus LAF
--laf Nimbus -J-Dswing.aatext=true -J-Dawt.useSystemAAFontSettings=lcd
So my netbeans_default_options in netbeans.conf looks like this:
netbeans_default_options="-J-client -J-Xss2m -J-Xms512m -J-XX:PermSize=32m -J-Dnetbeans.logger.console=true -J-ea -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true -J-Dsun.zip.disableMemoryMapping=true --laf Nimbus -J-Dswing.aatext=true -J-Dawt.useSystemAAFontSettings=lcd"
My solution is to start Netbeans with an other Theme, for example Candido Calm looks good with Netbeans.
This is my Netbeans starter (/home/user/bin/netbeans):
#!/bin/sh
GTK2_RC_FILES=/home/user/.themes/Candido-Calm/gtk-2.0/gtkrc /opt/netbeans-dev-trunk/bin/netbeans
I got this information from here: http://www.florian-hacquebart.eu/?p=214
Before you make any changes to Netbeans, go to the terminal and enter:
netbeans --laf com.sun.java.swing.plaf.gtk.GTKLookAndFeel
It should cause Netbeans to use your GTK theme. If you like what you see:
*I don't use ubuntu so but I bielive this is correct:
1)In terminal gksudo gedit /usr/share/netbeans/etc/netbeans.conf
2)Look for a line that starts with netbeans_default_options.
3)change the entire line to read (all one line): netbeans_default_options="-J-Dswing.aatext=true -J-Dawt.useSystemAAFontSettings=on --laf com.sun.java.swing.plaf.gtk.GTKLookAndFeel"
There are various fidelity problems in the Swing GTK L&F which manifest themselves differently on different GNOME and Unity releases, themes, and of course Java versions. NetBeans per se does not do much with it. Always check in SwingSet or similar as a baseline.
精彩评论