IDE for Swing applications development

Viewed 32657

Is there any IDE that simplifies creating Swing applications (ideally something along the lines of Visual Studio)

31 Answers

Like others have mentioned, NetBeans' visual editor is pretty good, but it's based pretty heavily on the Swing Application Framework, so you'd need to get an understanding of how it works to properly use it (although you don't need to dig in to just test things).

Other than that there are also:

Personally I've used NetBeans' and IDEA's visual editors. Both are nice, but I thought NetBeans had a leg up, because it doesn't use any proprietary way of saving the GUI structure and instead does something similar to what Visual Studio does - auto-generating the code that you can then add to. IDEA stores the information in a separate file which means you have to use IDEA to edit the layout visually later.

I have not used Eclipse's Visual Editor.

My vote is for NetBeans' visual editor. I think it satisfies what most people are looking for in a visual editor and leaves it flexible enough to plug the holes manually through code without affecting the visual editor (so you can switch back and forth between code and design views without breaking either).

For me, the best visual Swing editor is JFormDesigner, which you can run standalone or as a plugin for IntelliJ IDEA and Eclipse.

It generates proper (actually readable) source code, it's very ergonomic and intuitive and, above all, very extensible. That last point is really important, because if you want to build a decent Swing application, you'll have to extend the base components or use some third-party libraries and it must be easy to integrate those in the visual editor.

It's not free, but it's a bargain for the power you get (129 EUR / 159 USD). I've been using it for a few years and love it.

Netbeans has some GUI-building support, and it's one of the most popular Java IDEs on the market. Give it a look.

Abeille is very good and is based on the JGoodies FormLayout. Unlike almost every other Java GUI builder, Abeille does not generate code by default. In the project I used it on, it was wonderful to avoid reading or scrolling through the layout code (because that code no longer existed). Most of our hand-written code concerned itself with connecting events to actions, simply asking the layout for the relevant controls.

It's a crime that code generation is the default way to layout code in Java because better ways of doing GUIs have been around for decades. I have used Matisse, the NetBeans GUI code generator. While Matisse (now known as "Swing GUI Builder") makes it pleasant to layout components, it is similar to all other code generation tools because when you use Matisse you must live in constant fear that someone else edited the "you cannot edit this in NetBeans" GUI sections outside of NetBeans. As soon as you touch the layout builder again it could destroy their work and then you have a broken GUI. There might be some simple task like re-ordering a variable initialization and its use or re-naming a variable (this was especially a problem when using Matisse's database feature). You know how to do this by editing the un-editable source code but may waste time trying to figure out how to do the same thing in the GUI builder. Like most code generation tools, it might get you started, but eventually you will have to maintain the generated code yourself.

The latest version of NetBeans include a very nice and simple visual editor for Swing called Matisse

Matisse

I have switched between several IDEs and the one that I believe has the best GUI builder in terms of use and performance would have to be NetBeans.

Frankly, I've never seen an editor which comes even close to what I can do manually in a text editor. All the visual editors are nice if you only have very simple needs like putting a few buttons in a window. When things become more complex, visual editors quickly loose their competitive edge.

I usually use a bunch of high-level classes built from more basic widgets and wire my UI from that. This also allows me to easily test my UI with automated JUnit tests (because I can control what the source looks like).

Lastly, changes to the UI won't generate unnecessary noise in the version control system.

I have tried a few and the closest I have found that comes close to Visual Studio is NetBeans. Version 6.5 is excellent and really improved over version 5.

I'm a big fan of JetBrains, and when it comes to Java, IntelliJ is the best IDE I have used.

For Swing, they have a fully interactive UI builder. And, for actual coding, their intellisense can't be beat.

I used to use MyEclipse quite a bit. It had a decent IDE for making Swing forms and such. I assume it has improved in the past year - they seem to add features in gobs and heaps, quite often.

http://www.myeclipseide.com/

As I'm using Eclipse, I use the Visual Editor plugin. It generates clean source code, with good patterns and easy to patch/modify/extend. Unfortunately, it is not very stable. But it's worth trying.

I like Eclipse's VisualEditor (VE), and sometime ago I've tried to switch to another editor, but I found it impossible. Visual editor has this feature that it generates manageable, readable, editable, and easy-to-understand code.

Unlike both mentioned earlier NetBeans editor and WindowBuilder it uses the lazy initialization pattern to separate initialization of components. Also it does not need to lock down parts of code that you can't edit; you may edit code by hand, and VE is still able to work with your changes.

The only disadvantage of VE is that it uses Eclipse v3.2 (Callisto) (there is no official build for Eclipse v3.4 (Ganymede), or Eclipse v3.3 (Europa)), so effectively you have to use two Eclipses instances, one for VE and one for the rest of the development.

I took it from recent discussion on comp.lang.java.gui (I was the author of this post, so I could do it rightfully). Here is the link to the whole discussion.

I think the best editor that can exist is Visual editor for Eclipse.

The only drawback is the fact that we can't re-edit the visual part when we modified the source code. I hope one day we will have a tool that rivals Visual Studio in this aspect.

Related