How to change line height in NetBeans’ editor

After changing font size in editor in NetBeans 6.5, the line height (line spacing) all of a sudden grew to about 2 “normal lines”, and didn’t change back even when I returned to the original font size.

The only work-around I found was to edit manually the editor’s configuration file (since this option is not available via GUI).
The file org-netbeans-modules-editor-settings-CustomPreferences.xml can be found in ~/.netbeans/6.5/config/Editors/Preferences (on Windows, it’s in {install_dir}\ide10\config\Modules ). If it’s not there, change any editor settings in NetBeans IDE, and it’ll create it.

Open this file in your favourite text editor, and add the following code right before the last line (right before the </editor-preferences> tag):

<entry javaType="java.lang.Float" name="line-height-correction" xml:space="preserve">

And that’s it! Restart the NetBeans IDE, and all should look much better. Happy coding!

Another solution, thanks to Mark :

  1. Install sun-java6-jdk
  2. Uninstall open-jdk
  3. Reinstall NetBeans