Monday, February 26, 2007

Pimpin' Netbeans UI in Linux (laptop)

This assumes you know how to do stuff around Netbeans and Linux.
I have the following in my Laptop.
Ubuntu Dapper Drake - Running GNOME 2.14 and Sun JDK 6.
Default X11 font rendering sucks a little. So, I applied sub-pixel smoothing patches.
I downloaded and started using Netbeans 5.5, which is pretty good. But by default it has the "Metal" look and feel, which is not very exciting. So, I decided to make Netbeans look "better".

I tried enabling the GTKLookAndFeel so that it looks native. But I must confess, the Java font rendering on GTKLookAndFeel is just plain horrible. My next choice for look and fee was JGoodies. JGoodies is a pretty neat and simple Look and feel library.

So, first you need JDK6 for better UI and Font rendering.
Download JGoodies look and feel and place the looks-2.1.3.jar in to your netbeans-5.5/core folder.

Now, edit your netbeans-5.5/etc/netbeans.conf file so that your netbeans_default_options value looks like :

netbeans_default_options="-J-Xms32m -J-Xmx384m -J-XX:PermSize=32m -J-XX:MaxPermSize=384m -J-Dswing.aatext=true -J-Xverify:none -J-DPlastic.defaultTheme=ExperienceBlue -J-DmarkContentBorders=true -laf com.jgoodies.looks.plastic.PlasticXPLookAndFeel -J-Dapple.laf.useScreenMenuBar=true"

Here, important lines are
  • J-DPlastic.defaultTheme=ExperienceBlue - this is a good theme on eyes
  • -laf com.jgoodies.looks.plastic.PlasticXPLookAndFeel - XP like look and feel.
  • -J-Dswing.aatext=true - Force font anti-aliasing options.

Start your netbeans with these options and it will look much better. But the tab headers are grayish and they look really horrible:

So, here is a fix for that. Download the tab header netbeans module from this site, and install it in your netbeans - by the following steps.

From Tools -> Module Manager, Click update button.
In Update center wizard, select Install manually selected downloads, and add and install the downloaded nbm module.



Restart your netbeans, and it should look pretty good. ( Here, I have included my Ubuntu Menu text to show how the font still sucks a bit)



Now, for editor font, get "Consolas" ( it is a Vista font so get it by hook or crook) and use it as your editor font. It looks nice - as nice as Apple's Monaco.

No comments: