The complete guide to tuning the appearance of NetBeans
NetBeans IDE is comprehensive and powerful, though not always as pretty as you’d like it to be, which, in turn, can have an impact on the efficiency and enjoyment of your coding experience. Since there will never be one single appearance that will please absolutely everyone, it helps to know what you can do to make NetBeans pleasing to your own specific eye.
The idea that there’s ever going to be an out-of-the-box appearance, for any tool, that will please absolutely everyone in the world who uses it is a fallacy. Not only do operating systems render user interfaces in different ways, not only are there variations resulting from video cards and other hardware components—there’s also the simple question of differences in taste. One size does not fit all. For these reasons, it’s probably a more realistic desire to want to have a tool that has a lot of ways to let you configure its interface, than to want to have a tool that comes with a 100% perfectly preconfigured appearance with which everyone is going to be equally satisfied, since that would be impossible to achieve.
Fortunately, NetBeans is extremely configurable. Not only can the editor and its fonts be customized, separately for each language it supports or globally—you can also completely change its entire “look and feel”, by trying out and than selecting one of many different “look and feel” plugins that are available. It speaks to the popularity of NetBeans that so many different plugins and themes exist, since many, even most, of them have been created by NetBeans users around the world and have been contributed, in most cases for free, for anyone in the world to use.
Interestingly, if you’re using the NetBeans Platform as the basis of your software, such as done at Boeing, NATO, and many many other organizations, and especially if you’re creating an editor of some kind, this article can also be of relevance to you, since the instructions, plugins, and themes described below should be applicable to any application created on top of the NetBeans Platform, of which NetBeans IDE itself is only one.
Starting from the screenshot below, which is the default appearance (for me, in my environment) of the latest release of the IDE—NetBeans IDE 8.1 Beta—I will move through a range of other screenshots and explain how to get there yourself.
Again, note that these are all screenshots from NetBeans IDE on Windows, so your mileage may vary considerably, though at the very least this article should help to show you the diversity of appearances and styles available and maybe inspire you to think out of the box in relation to aspects of NetBeans that you might like to see differently.
With that background, herewith is a complete list of the ways in which you can change and finetune the appearance of NetBeans. The mechanisms for working with the appearance of the IDE are in three categories:
- In “Configuration“, you’re introduced to the ways in which, without installing anything externally at all, you can reconfigure the IDE to suit your requirements.
- In “Plugins“, a list of plugins is provided that reconfigure the complete user interface of the IDE, i.e., these are Java Swing “look and feels”.
- In “Themes“, you’re shown where to get ZIP files that can be installed in the Options window and that provide a new look specifically for the editor, i.e., all the colors and fonts in the editor can be impacted by the advice in this section.
If anything is missing, which is perfectly possible, please leave a comment at the end, and your insights will be incorporated!
In this section, you’re introduced to the mouse scroll mechanism for increasing the font size of a specific document, the “Fonts & Colors” tab in the Options window, the “–fontsize” setting in the “etc/netbeans.conf” file in your NetBeans IDE installation directory, and the built-in look and feels that you can set in the “Appearance” tab in the Options window.
- Mouse Scroll. Hold down the Alt key and scroll up and down in any editor and you will increase/decrease the font size for that particular document. Yes, it’s as easy as that! When you close and reopen the document, the font size will be back to the default.
Code Font. You can change the font and size for the code in the editor, either globally or per language. Go to the Options window, select “Fonts & Colors”, and tune the fonts and colors to your liking. Some predefined profiles are provided out of the box, including “Norway Today” and “City Lights”, which both make the editor dark, with predefined settings for all the colors and fonts, which blend well with the dark background of the editor.
Personally, and note again that I am on Windows, so this advice may not work well on other operating systems, I always use “Consolas 18 Bold”, which is used in the screenshot below, as well as most of the others that follow.
By the way, you see see the “Show Only Editor” mode of NetBeans IDE above, which removes everything from view, e.g., the Projects window, Output window, toolbar, etc. You can toggle back/forth between “Only Editor” mode by pressing Ctrl-Shift-Enter, which, as you can see above, is different to maximizing the IDE, which would have kept all the windows and simply caused the IDE to cover the whole area of your screen, which is toggled via Alt-Shift-Enter.
- IDE Font Size. I find that, for me, on Windows, NetBeans IDE looks better when I increase the font size throughout the IDE, i.e., by going to the “etc/netbeans.conf” file in your NetBeans installation directory, and adding “–fontsize 14” as the first key/value in the “netbeans_default_options” setting. Below, everything is exactly as originally found for the “netbeans_default_options” setting in “etc/netbeans.conf”, with one exception—”–fontsize 14″ has been included.
netbeans_default_options="--fontsize 14 -J-client -J-Xss2m -J-Xms32m -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.java2d.dpiaware=true -J-Dsun.zip.disableMemoryMapping=true -J-Dnetbeans.extbrowser.manual_chrome_plugin_install=yes"
The screenshot below shows the result of doing this, while most of the following screenshots show the same 14 font size, too.
The font of everything you see in the screenshot above has been impacted by the “fontsize” setting, except for the editor itself, i.e., look at the font size of the display text in the menus, the display text in the tabs, and the display texts of the nodes in the Projects window.
Here’s some feedback on the relevance of the above:
Built-in IDE Look and Feels. In the Options window, go to the “Appearance” tab and then use the “Preferred look and feel” drop-down to select one of the built-in look and feels, which are “Metal”, “Nimbus”, “CDE/Motif”, “Windows”, and “Windows Classic”.Below, you see the effect of choosing “Nimbus”. In particular, take note of the tabs, which are the hallmark of the Nimbus look and feel.
Outside of the area of colors and fonts, and so on, there’s also other ways of tweaking the appearance of the IDE, simply by reconfiguring it, via further settings you’ll find in the Appearance tab of the Options window. For example, you can let the tabs of the windows be displayed along the bottom (or one of the sides) of the IDE, instead of along the top.
In this section, you’re introduced to a range of plugins that are implementations of the Java Swing look and feel mechanism.
- Darcula Look and Feel plugin. It is quite common and trendy, nowadays, to have your entire coding environment be dark. Not only is that the ‘hip’ and cool thing, and has gone as far as to be the default in some coding environments—it’s also a good thing for your eyes to not have the constant glare of white backgrounds, especially when you’re coding at night. Hamit Hasanhocaoglu’s has created a plugin for Netbeans IDE that integrates the Darcula look and feel by Konstantin Bulenkov from JetBrains. A full article on the Darcula look and feel, together with instructions and related links, is available here on JAXenter.
Dark Look and Feel Themes plugin. As an alternative to the Darcula look and feel, you might want to experiment with the NetBeans team’s own dark look and feels. To instantly turn NetBeans IDE into a dark IDE via the NetBeans team’s dark look and feels, go to Tools | Plugins in the IDE, click ‘Available Plugins’, and look for ‘Dark Look and Feel Themes’. After installation and restarting the IDE, you’ll see the following:
Slightly hidden, but be aware that the plugin installs two different look and feels. The first you see above, called “Dark Metal” and is the one enabled by default. The other is “Dark Nimbus”, shown below, which is worth giving a try after you’ve used the above for a while, just for a change, and to see whether you prefer the one over the other.
Praxis Look and Feel plugin. Neil C. Smith, who leads the Praxis LIVE project, has spun out a plugin for NetBeans IDE, based on the Nimbus look and feel shown above, that provides the same kind of appearance as he uses in Praxis LIVE.
BizLaf Look and Feel plugin. Centigrade provides a look and feel that “dresses up your apps for business, instantly”, as described on the BizLaf page. The BizLaf look and feel is available as a commercial plugin for NetBeans IDE, which makes it look as follows:
ez-on-da-ice Look and Feel plugin. With Venkat Akkineni’s look and feel plugin, you end up with a really different and interesting coloring scheme, that avoids glare while not being as dark as a typical dark look and feel plugin, provided by the ‘ez-on-da-ice’ look and feel, as shown below. It is available in the Plugin Manager, under Tools | Plugins, as well as here in the Plugin Portal.
Make sure to avoid the issue described here by downloading a NetBeans IDE from after NetBeans IDE 8.1 Beta, if you want to install the ez-on-da-ice Look and Feel plugin.
Are there other look and feel plugins that should be included here? Leave a comment to that effect and the text above will be updated.
In this section, you’re going to be introduced to themes, which are different to plugins. Themes are aimed specifically at changing the editor, while plugins in this area typically impact the entire look and feel of the IDE. Plugins are installed via the Plugin Manager, which is available under the Tools menu. Plugins have the “.nbm” file extension, which denotes a NetBeans module. Themes, on the other hand, have the “.zip” file extension. You do not install these ZIP files into the IDE via the Plugin Manager. Instead, you go to the Options window and then click the “Import” button. Then browse to the ZIP file, select it to import it, and indicate which parts of it you’d like to use, which would normally be all parts of it.
Note: Despite the fact that themes are not plugins, they’re made available via the NetBeans Plugin Portal, since both ZIP files and NBM files can be uploaded there.
The themes concept is very cool, since you don’t need to learn about the NetBeans APIs and then create some kind of complex plugin. Instead, you can export your current favorite settings into a ZIP file (via the “Export” button in the Options window) and then share that ZIP file with others. There’s even two community-contributed theme builders to help you design your themes—http://svenspruijt.nl/themebuilder, which you can read about here, and http://netbeansthemes.com.
It is noticeable that most of the themes available are those that help to let NetBeans resemble one of the other editors out there, i.e., clearly the authors of these themes are using the themes concept in NetBeans to feel more comfortable with it after migrating to it from another tool or while using another tool alongside NetBeans. In fact, on the Plugin Portal, one of the most popular themes provides a Sublime-like appearance for the NetBeans editor, while there always tend to be multiple Sublime themes available in the Plugin Portal. Most have a screenshot showing the effect of importing the related ZIP file, giving you a good idea what you’ll get by using the theme.
Sublime. As stated above, there are several Sublime themes in the Plugin Portal. The one shown below (together with Dark Metal look and feel, with font set to Consolas 18 Bold) is this one.
Atom. For users familiar with the Atom editor, the Fira font in NetBeans IDE together with the Atom Fonts and Colors Theme should be a welcome addition. Note that below, just like near the start of this article, the “Show Only Editor” mode is in use, so that only the editor is shown.
Obsidian. Unlike most other themes, the Obsidian theme is a plugin, i.e., you’ll get hold of the “.nbm” file and install it using the Plugin Manager to get the effect below. Note that below, just like near the start of this article, the “Show Only Editor” mode is in use, so that only the editor is shown.
Torti Dark. Inspired by Visual Studio, the Torti Dark Theme looks as shown below. Again, here the “Show Only Editor” mode is in use, so that only the editor is shown.
Panorama Eye Friend. Created by Panorama Soft, the Panorama Eye Friend looks as shown below. Again, here the “Show Only Editor” mode is in use, so that only the editor is shown.
Other Themes. Many more themes can be found in the NetBeans Plugin Portal and I will be adding more examples here over time.Be sure to take a look at the two on-line repositories referenced above, i.e., these are not only theme builders—they provide complete, configurable, and downloadable themes in every imaginable combination.
NetBeans Theme Builder. http://svenspruijt.nl/themebuilder
NetBeans Themes. http://netbeansthemes.com
Before experimenting with the themes above, take a look at the built-in themes, which may save you the time and energy of trying out the others, “Norway Today” and “City Lights”, available in the Profile drop-down in Tools | Options | Fonts & Colors.
In conclusion, I would not be surprised if there are more ways to configure the appearance of NetBeans IDE and I am hoping that those who know of additions to the mechanisms described above will add those to the comments below, after which I will integrate those comments into this document.