Netbeans is a free, open source IDE for developing software in Java. It's been around for almost 15 years, having gotten its start around the time Java began. Version 7.0 is about to be released, and I got my hands on the Beta release of this new version.
In the past I've generally preferred Eclipse for my Java development—not because I felt it was necessarily better, but simply it's what I used at various jobs and grew accustomed to. So I didn't spend much time on NetBeans. But they do have a lot in common. One common element is that you can now use both of them for more than just Java development. NetBeans supports development in several languages, including PHP and C++ (as does Eclipse). And also like Eclipse, NetBeans is itself written in Java.
Rather than try out the whole product and review it here (which would basically be re-iterating what's been written all over the place), I wanted to just focus on the new features.
According to The Great Wikipedia, the all-knowing, always correct reference guide (he said sarcastically), NetBeans was originally code-named Xelfi, to sound like Delphi, but with an X for Unix. Indeed, the Wikipedia page points to the original home page for NetBeans, which also says it was called Xelfi. I'm not sure if they meant Delphi as in Borland Delphi; but what makes that timely for today is that Borland Delphi went on to be a great RAD tool with a full drag-and-drop designer. And this latest version of NetBeans has just that – some new designers. It already had some great drag and drop designers, but one of them is improved, which I will look at here. And because I grew up on Delphi (well, I was already in my 20s actually, which according to one certain founder of DaniWeb, makes me old today!), I've always appreciated good drag-and-drop designers in IDEs.
So let's look at this new designer first. It works with a certain layout called "Grid Bag". In Java, when you're creating a GUI, you work with layouts, which automatically arrange your controls for you. The original reason was that your Java applications could be run on any number of operating systems, and if you tried to lay out your controls and make it look great for one operating system, it might look awful on another. So instead, the idea is that you give the overall look of where you want your controls and generally how big they are, and let the layout manager decide on the final size and location. One such manager is the Grid Bag, which lets you organize your controls in a grid fashion, putting them in cells within the grid. The Grid Bag has been around awhile, but this designer is new. And it's pretty cool.
The first thing you do is select the layout by right-clicking on your form, as shown here:
Then you right-click and choose Customize Layout, which opens up the new designer:
If you already have controls on your form, they'll appear all in a row arranged from left to right. That's probably not what you want, so now you can drag them around in the grid, positioning them how you like. Here you can see where I dragged the one called Label2 down below the first row. A new row appeared and I dropped it in the left-most column:
Then I continued dragging controls around until I came up with this:
And finally, I removed the extra columns on the right:
While in the designer, you can set some layout properties such as anchoring and the like. You can't actually set the rest of the properties from within the layout designer, but that's okay. Just close it and get back to your form. From there, you can click on your controls and the properties window works as you would expect:
All in all, this designer is very easy to use. And that's the way it should be. You don't want to have to waste extra time on the GUI when you could be writing actual code.New JDK Support
Another new feature of NetBeans is support for the JDK7 version of Java. But let's be clear about something here: NetBeans is not a Java compiler; instead it uses the existing Java compiler. So what do they mean it supports JDK7? Really they're talking about how the IDE's editor knows the new syntax for the next version of Java, which is also version 7.
Here's another new feature relating to Java itself: the IDE now supports a build system called Maven, which is an alternative to the tried-and-true Ant that so many of us embraced after finally ditching the antiquated Make (when we had no more hair left to pull out of our heads). So if you're a Java developer and prefer Maven over Ant, you can now use it for your entire build process. (Previously in NetBeans it was only available for some aspects of the build.)
New C++ Features
Before I end this, I want to mention one feature that's not part of the Java aspects of NetBeans but rather C++ development. Most binary applications that run on your computer are written in C++. (For example, Microsoft Word is developed in C++, as are most of the browsers.) I spent many years as a C++ programmer, and I know that there are times when you need to debug a natively-compiled executable, but don't have access to the source code. That executable might even have debug information embedded in it, but still no source code. Visual Studio has for many years been able to open up an executable, and let you step through the assembly code, and using the debug information if it's available. And now NetBeans can do that as well, at least as long as debug information is available. As a former C++ programmer, I can definitely appreciate this new feature.
Conclusion I've only touched on the new features. This thing is sharp. Check out the New and Noteworthy page at http://wiki.netbeans.org/NewAndNoteworthyNB70 for all the new features. And if you haven't used NetBeans, that's only a list of the new features. This is a mature product that's been around for well over a decade. I know that I'm going to play with it more and decide if I'll leave Eclipse and go for NetBeans instead. (And being an old guy, I can be grumpy and resistant to change!)