tags:

views:

2351

answers:

16
+14  Q: 

IDE for Swing

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

+2  A: 

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

Brian Warshaw
+9  A: 

I like the Swing GUI Builder from the NetBeans IDE.

pauldoo
A: 

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/

Knobloch
That is the netbeans one which has been ported.
Thorbjørn Ravn Andersen
+2  A: 

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

Matisse

Telcontar
+1  A: 

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.

Frank Krueger
+12  A: 

Like others have mentioned, Netbeans' visual editor is pretty good, but its 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's 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).

Al
That is not true. Netbeans' visual editor is not heavily based on Swing Application Framework at all unless you opt-in to use the framework in the beginning. Matisse did use to have an extra dependency on GroupLayout but now it's included in jre so there is no dependency on SAF.
wbkang
An example of that dependency is the storing of string literals used for display (like label text). Those are stored in properties files that are automatically managed (loading, structure) by the SAF. It's all built-in to the latest JREs so you don't need extra jars, but you do need to understand the architecture of the SAF in order to use it effectively.
Al
+1  A: 

Try Instantiations' Windows Builder Pro. It includes Swing Designer, which is a Swing UI builder. It is based on Eclipse.

zvikico
+7  A: 

For me, the best visual swing editor is JFormDesigner, which you can run standalone or as a plugin for Intellij 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.

alves
+1. JFormDesinger is the most polished GUI Builder I've ever seen. You just have to try it to see how it works - no screenshot can show how good it works.
A. Ionescu
A: 

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.

Laurent K
+1  A: 

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.

jwarzech
A: 

I like Eclipse's VisualEditor, sometime ago I've tried to switch to another editor, but 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 WidnowBuilder it uses lazy initialization pattern to separate initialization of components. Also it does not need to lock down parts of code that you cant edit, you may edit code by hand, and VE is still able to work with your changes.

Only disadvantage of VE is that it uses eclipse callisto (there is no official build for ganymede, or europa), so effectively you have to use two eclipses one for VE and one for rest of developement.

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

jb
+2  A: 

Abeille (https://abeille.dev.java.net/) 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 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.

joeforker
Layout as code is the only approach that allows you to decouple from that particular designer you are using after you have finished. In other words, no vendor lock-in.
Thorbjørn Ravn Andersen
A: 

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.

Aaron Digulla
A: 

I have tried a few and the closest I have found that comes close to Visual Studio is Netbeans. V6.5 is excellent and realy improved over v5.

A: 

We are doing Swing development since nearly 10 years. There are some nice GUI builders available (e.g. JFormDesigner), but all restrict us too much in different kinds.

For example, we have a lot of components without public no-arg constructor (e.g. a JTable subclass which requires the model in the constructor) or we have component factories.

Desktop applications usually have to be obfuscated. Obfuscation very easily breaks user interfaces created with a GUI designer or requires much work to avoid obfuscating such classes.

Another often happening case is that, for example, a panel should only contain some components depending on some condition. Simply hiding them would make the GUI look bad; they rather should not be added instead. I never found a GUI editor which provides this flexibility and even if there would be one, it would be so hard to use, that I definitely would be faster with good old Java code.

mklhmnn
A: 

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 on this aspect.

Aberghousse