As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Is there any IDE that simplifies creating Swing applications (ideally something along the lines of Visual Studio)
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:
the IntelliJ IDEA visual editor (flash demo of the features)
and Eclipse's Visual Editor
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).
I like the Swing GUI Builder from the NetBeans IDE.
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.
There are two that you can use (I've used them both, and they are both very powerful, and easy to use):
NetBeans which has a built in GUI Builder.
Or you can use:
Eclipse with the Windowbuilder plugin
(it can be downloaded here and here)
Personally, I prefer Eclipse with Windowbuilder, but that's just me. You can use either one.
Here is a picture of the Windowbuilder plugin:
And here is a picture of NetBeans' built in GUI Builder:
Netbeans has some GUI-building support, and it's one of the most popular Java IDEs on the market. Give it a look.
Try Instantiations' Windows Builder Pro. It includes Swing Designer, which is a Swing UI builder. It is based on Eclipse.
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.
WindowBuilder Pro for Eclipse
Free!
It works with existing code and doesn't lock you in (as opposed to NetBeans)
It works with MiGLayout
It does have some conventions that your view classes have to follow, though.
Installing in Eclipse v4.2 (Juno):
Goto - menu Help → Install New Software...
Select - Work With: Juno - http://download.eclipse.org/releases/juno.
The WindowBuilder items are under "General Purpose Tools" (or use the filter).
Older versions and zips are available at http://www.eclipse.org/windowbuilder/download.php.
The latest version of NetBeans include a very nice and simple visual editor for Swing called Matisse
Matisse
I have a very good experience with NetBeans. It's so easy if you know every minor parts of these applications.
The most complicated part is using, for example, the layouts (if you can not handle complicated parts), but everything is almost plug & play.
And in addition, you can put JFrame into other frames without creating another frame class for this. I think that will be good.
I recommend WindowBuilder plugin for Eclipse IDE 3.7.2 Indigo / 24 February 2012.
Here's for the step-by-step installation: Create Java GUI as Easy as Visual Basic
NetBeans is the simplest to use (http://netbeans.org/). However, it does not allow you to edit (fine tune) the generated code.
JDeveloper (http://www.oracle.com/technetwork/developer-tools/jdev/overview/index.html) is another solution and does allow you to edit the code... but I feel NetBeans is more intuitive.
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.
Eclipse Visual Editor is pretty dull in my experience. I had more luck with JBuilder, which is also based on Eclipse, simply adding a few plugins to it as many other commercial products do. It is still not able to parse any Swing code (I doubt any Swing WISIWYG editor does), but if you start with it, it gives you relatively seamless experience.
You need to pay for it though.
At the end of the day, I have worked with different similar UI tools, Flash Builder, Delphi etc., but unless you do some relatively trivial UI design, not including much business logic and communication with other layers, you'll have to accept that what you are capable of creating in code once you learn to do it properly is much more powerful than what any editor is capable of providing you with.
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.
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.
JFormDesigner.
I used NetBeans extensively in the past for GUI design, but I am now using IntelliJ with the JFormDesigner plugin. I have tried several other solutions, and this is the one I am sticking with.
JFormDesigner also works with JBuilder and Eclipse, so you are not locking your projects to one particular IDE.
Of course you should use NetBeans for building a Java Swing GUI. The drag and drop features and auto-code generation are quite mature.
For Eclipse, I am not sure. But because IBM has its own SWT package for GUI, I am not sure whether it support Swing.
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/
Use NetBeans, I have also successfully developed one application using NetBeans.
It is realy awesome, it helps you while writing the code.
Since Swing generates some code on its own so it is really helpful to use Netbeans.
Go through it and you can always ask question and problems.
It will be good if you go for latest version release.
I have always coded my UIs by hand. The frustration of dealing with screen builders and filling out all those property sheets is too much for me. After a couple of screens and a little research I am just as productive.
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.
We have been doing Swing development for nearly the past 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.
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.
I have not used anything other than NetBeans for Swing, but I have been extremely happy with it. I used it for 18 months on a $25M application and to develop an prototype application to replace a Windows Forms app.
Up and until Microsoft came out with WPF, in my opinion, there was not a better tool kit for traditional desktop applications. (I always found Windows Forms too limiting).
I personally will suggest NetBeans Swing Builder. Yet, if you want total control and to gain an in-depth understanding of the Swing framework, I have noticed doing it free hand is the ultimate choice.
window builder pro is good option and it is free also.
As others have mentioned, my best experience with Java SWING applications is with NetBeans. NetBeans has a WYSIWYG editor, and the code is automatically generated for you, which is then protected, however you can add custom code to add listeners and other events that the end user may be interested in using, such as buttons, text forms and areas, and other nice GUI tools.
Related
Pretty soon now, we're gonna need to develop a GUI for creating configurations (more like scripts, to be honest) for our EAI solution at work. Think of a typical workflow editor. The visualization of the actual flows will most likely be a completely custom job, either in Swing, SWT or JavaFX 2. What I have trouble with choosing is whether to do everything else by ourselves or using a rich client platform.
In particular, I've noticed that JavaFX 2 is getting a lot of attention and seems to be really pushed by Oracle as the next big thing in the Java GUI landscape. The demonstrations look interesting and perhaps this newer API is more closely focused on productivity as opposed to the tons of boilerplate code that Swing tends to impose. Using a newer technology that gets a lot of support seems like a safe bet for future maintenance.
Using an RCP would have definite benefits for this project. Whether we go for Eclipse or NetBeans as the platform, having existing plugins/modules for viewing the underlying (XML) config, version control etc. would offer powerful functionality with minimal work. I also like the idea of having project types of our software next to Java projects in the same GUI. Even simple stuff like window management and customly arranging panels is much better handled by RCPs that what we could whip up.
So the question now is, what technology or combination thereof is viable? My options, as far as I can see, are thus:
Eclipse. I'm not too eager for using SWT, though, since I'm more familiar with Swing. NetBeans is also my primary IDE and I'm most familiar with it. It always felt more intuitive too.
NetBeans. This'd allow development of custom components in Swing. A lower learning curve for me.
NetBeans + JavaFX 2. This idea appeals to me... Use NetBeans for the RCP goodness and using JavaFX 2 for custom components. JavaFX 2 apparently integrates with Swing, but how well can this be done within NetBeans?
Swing or JavaFX 2. Do all the GUI work ourselves or use some existing framework(s) to get most of what an RCP offers. This seems like a lot of work but also offers superb control. I'm a bit loathe to try this in Swing. How well would JavaFX 2 suit itself to this?
Basically my only GUI experience is in Swing on small apps. This is the first time I'll be going for something that would warrant a RCP. But JavaFX 2 seems the way forward and I don't want to miss the boat on that one. If Swing might be on the way out, I'd prefer hopping onboard the newer technology.
If there are people who can share their experiences, have tried something like NetBeans + JavaFX 2 or are closer to the forefront of JavaFX and can recommend/discourage its use for this sort of thing I'd be most interested.
I realize it's a somewhat open question, but I can't really think of a more appropriate place. I'm not looking for a "what's the best RCP / is JavaFX better than Swing" debate. I'm looking for valid points for/against their use in this context.
My opinion in few lines,
JavaFX2 can be integrated into Swing and SWT applications into a panel/container.
Swing doesn't provide a structured architecture to deal with multi components applications, Eclipse RCP does but it's heavier and sometimes too complex (WindowWorkbench etc..) and hard to customize.
If you have a good UI Designer in your team (Developer or Graphic Designer) you should begin to work on an application Full JavaFX2 with a simple but powerful framework (like JRebirth or a custom one you can build on your own way).
JavaFX will be the Java UI Standard for years to come, It could'nt be a bad choice, thus its architecure is pretty good and powerful
Moreover javaFX2 could be used into a browser and/or deployed online with help of JNLP.
Don't bother you to learn complex undocumented framework (like EclipseRCP), create Yours !! and be free to make the application your client need :D
I worked 3 years on Swing Appz, 2 years on Eclipse RCP, and 2 years on Flex/Silverlight/JavafX apps
Here some points and (personal) opinions for helping you determining a proper solution for your current situation:
Eclipse vs. Netbeans
Personally, I dont't like big discussions about pros/cons of IDEs. Just use the one you feel most comfortable with. If you work in a team, make a voting. Considering Swing both IDEs are fine (IMHO Netbeans has the better GUI builder). Considering JavaFX 2.0 both IDEs are also fine but both share the absence of a GUI builder. I wouldn't recommend a mixture of IDEs.
JavaFX 2.0 vs. Swing vs. SWT vs. Eclipse RCP
Well, I don't - I even can't - want to tell you which of the above listed UI technologies is best since I don't know enough about your project's environment - experience, human resources, budget, timeline etc. Having a lean timeline and a team(?) of experienced Swing developers should lead the decision to Swing. Same for SWT and Eclipse RCP. Cutting edge developers might tend to try JavaFX. I agree, JavaFX gets a lot attention and you get great looking demonstrations, but keep in mind, that using JavaFX requires - additionally to the JRE - the JavaFX runtime on each client.
Hope this helps.
We switched to javaFx due to FXML usage,you can use MVC pattern ,you can add javascript and css init,but it seems slow when changing page
I need to develop some java gui using swing.
A few years ago I did develop a bit with swing.
But it was pretty exhausting, you see, back than there weren't much tools to help you.
But I do believe today it should be easier, there must be tools.
I would like to use some kind of a generator or maybe a utility or even a framework.
I know Eclipse has a few plugins and Netbeans has a nice built in tool. I have also heard good things about Jide framework.
But still, I don't really know any of them.
Is there a tool/Utility/Generator/Framework that you have used and really helped you?
Obviously I would prefer something that is free, but if you know something that is really really good and cost money, that could work too.
Thank you.
Actually the faster way to write Swing frames that I've found so far is to use Groovy SwingBuilder but you have to include groovy's jar inside your project to use it. This is an example taken from their website, it's mainly synctactic sugar but it helps:
def frame = swing.frame(title:'Frame', defaultCloseOperation:JFrame.EXIT_ON_CLOSE, pack:true, show:true) {
vbox {
textlabel = label("Click the button!")
button(
text:'Click Me',
actionPerformed: {
count++
textlabel.text = "Clicked ${count} time(s)."
println "Clicked!"
}
)
widget(sharedPanel())
widget(sharedPanel())
}
}
Otherwise there are some "visual" approach to the problem but they don't let you integrate so quickly with the interface you wrote (for example jvider), NetBeans and Eclipse have some plugins to do the dirty work but as before: you can't integrate so seamlessy.
For quite a few years I've used NetBeans built in "Matisse" form editor. It's got the advantage of being built into the IDE, so that the form editing and code generation is rather seamless. If you're new to Swing it can be a big boost (as long as you continue to use NetBeans as your IDE).
There are some issues, however:
You can't easily move a form to another IDE. The generated code may work, but the form data itself is stored an XML file.
If two more people edit a form at the same time, conflicts can arise in SVN/CVS that are nearly impossible to reconcile. The XML is not really human readable.
In the past I found the form XML file to corrupt itself, which would lead to form generation errors.
The form editor can get a mind of its own sometimes, destroying your arrangement when you do something as simple as resize a control.
In spite of all the above, I've continued to use it as nothing else has seemed appealing to me.
My suggestion would be WindowBuilder Pro. It's a GUI designer that comes as a plugin for the Eclipse IDE.
You can use it to generate Swing, SWT or GWT GUIs and even generate some Eclipse RCP code if you need to. I must say that it works quite well for me. I haven't used it to generate any Swing code, though, as I prefer to work with SWT instead.
In terms of GUI Builders, NetBeans and IDEA (now going open source with the 9.0 Beta) both have free GUI Builders.
GUI Builders have all the kinds of downsides that Jason spoke to. If you want good control over what is going on, but still want something sane to write a complex GUI by hand, check out MigLayout.
Eclipse's Visual Swing is a promising upstart. It isn't the most stable thing in the world, but it does all the form stuff in code, so there are no separate files which are hard to read and merge in source control. When you first try it, it takes some getting used to. But once you learn to work around the bugs you pretty rapidly develop Swing GUIs.
I would go w/ matisse if you wnat to use a gui builder, and there are shortcomings as Jason mentioned, but you also need to include a jar file that is used by the matisse layouts, this may or may not be a problem.
But if you are going to be developming UI's in swing, you will soon come to find out most of the gui builders have many shortcomings, and when you have to change something the generated code is not always clear and is bloated. You will also find that once you become proficient you can write a ui much faster by hand than the gui builder, and you will really understand what is going on.
So I say stay away from gui builders, you will create better and more maintainable UI's, and w/ some time and experience will not want to use a gui builder. Just start w/ some of the basic Swing tutorials on layout.
May I humbly suggest Metawidget?
It takes a different approach to UI development - removing much of the error-prone, tedious work whilst still retaining the flexibility of traditional toolkits. It integrates with your existing front-end (Swing, in your case) and back-end (Java, I'm guessing), and works at runtime (no code generation).
There's a few short intro videos here:
http://metawidget.org/videos.html
If you get chance to take a look, I'd be most grateful for your feedback.
Regards,
Richard.
You can avoid GUI builders generated code by using ReflectionUI.
Advantages: you instantly generate your GUI and then you customize it visually (or with few code if you need something very specific).
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
What mechanism do you prefer for building a GUI: from scratch or using GUI-building software?
If the question is about GUI development using Swing then IMO it is best to code everything manually without a WYSIWIG tool.
In order for a manual UI design/coding to be efficient a really good layout manager should be used. MigLayout is one of such layout managers. Since I've started using it I have never looked back at WYSIWIG tools -- a sheet of paper, a pencil, MigLayout and you get a full control over your design and code.
Also tools like Balsamiq simplify making GUI mock ups for quick prototyping if the paper and pencil approach is not suitable.
My personal opinion is never use visual editors. Until there is a single standard for GUI-building in Java you will find yourself tied to an IDE. The best IDE for building Java GUI has switched around quite a bit in the last 10 years (I wonder how many projects were hit by a massive maintenance overhead from switching away from JBuilder for example).
For most applications, the actual layout of GUI code is probably something like 5-10% of the total amount of time you are likely to spend writing the app as a whole. Therefore even halving this by using a designer is not really saving you very much in the grand scheme of things.
Taking this together with the lack of flexibility and more complicated maintenance, it's almost always better just to write the GUI by hand.
I actually enjoy building GUIs with the NetBeans GUI Builder; the thing is, it is fairly customizable - it allows you to change the code used for auto-generation and the auto-generated code [no pun intended] (which is necessary for custom components), it also allows "easy" event-handling and binding. And NetBeans GUI Builder is not restricted to GroupLayout but rather allows you to choose which LayoutManager to use (a somewhat hidden setting in the form's properties dialog).
But it is not always the best choice; as others already said: MiG Layout is a good choice when you need to have full control of your application, knowing every single JLabel, every JButton etc.
I must confess I prefer Netbeans' GUI builder for the ease of use and WYSIWYG view.
But I also think that it does not even matter if you have created the GUI-Code by hand or with a GUI-Designer; adding Controls / custom Components dynamically works with both, doing this and that works with both etc.. The only thing that matters is that it works.
(From my point of view I do not see a point in coding a GUI manually if it can be done faster with a GUI-Builder, as I do not see why one should bother coding it by hand without some kind of benefit)
I use GUI builders to rapidly prototype designs and stuff like that. But when it comes down to building the actual production GUI, I code it from scratch. I'm not morally opposed to GUI builders, but I prefer the greater control over my code I get from writing it by hand.
Like any code generator tool, IMHO, you shouldn't use a GUI builder until you at least understand the concept - in this case, the Swing layout managers are particularly tricky.
If you give me the choice between NetBeans and by-Hand I'd definitely choose by-Hand. I was never really convinced by the NetBeans GUI builder's approach. At least the last time I used it, it relied on some proprietary sidecar files...
Look at Visual Editor for for Eclipse
You will still want to understand what the editor is doing for you.
You need to know how Swing works to be able to make things work properly. Nothing like building by hand to learn that :)
THEN the Netbeans GUI builder is rather nice.
Edit: I would strongly recommend going through the Java Tutorial Swing Trail - http://java.sun.com/docs/books/tutorial/ui/index.html
Both - use a WYSIWYG editor to get the ball rolling, but at the end of the day you'll need to manipulate your controls and in some cases create them programmatically at run time. Eclipse has a variety of free editors as plugins. Go to eclipse.org and look through the plugins listing.
Depends on your requirements. Some GUI building software work really well with simple applications, however, if your client requires many custom components the third party GUI builders may not work.
Also, it depends on the amount of forms and the complexity of them. If you need to build a form for each table in the database, for example, a third party GUI builder may be faster and cheaper.
In my experience, it really varies from project to project.
If you want a complex gui, then use something like netbeans to build it and create all of the events. If you're looking for a fairly simplistic gui, then building one by hand is still an option.
My company uses Netbeans for GUIs and eclipse for the regular programming.
We have looked but we haven't found any other (free or at least cheap) tool that does GUIs as good as NetBeans.
I used to write them from scratch with a plain text editor...
That depends what the reasons you're making the UI for,
I found that there are two reasons to make UI:
First is for clients, in these cases you want to UI to be polished and to handle really well in projects like this the core or essence of the project is the UI itself.In these cases it's usually the best to hand-craft the code for your UI because it's probably non-trivial code.
Second reason is usually quick & dirty UI where the core of the program is something else and the UI is created usually for Control aspects on your main application and you are the main client. In these cases the best thing to do is make the UI as quickly as possible as you don't want to "waste" time working on it and its more legitimate to use WYSIWYG editors.
I always find a GUI builder to be a good idea to begin with and then I end up in a situation where I am wasting my time fixing things to my own ways rather than that of the IDE and making them actually suit. And don't get me started on the messy code that GUI builders generate! Hence, it's often more efficient to build from scratch; at least for me...
I prefer hand coding the GUI myself so I can have complete control. For complex layouts I will use JGoodies Form Layout. Their syntax for specifying the layout makes it easy to draw the GUI on paper then transfer this to code.
I tried the Netbeans GUI builder and was impressed by how easy it was to use. Then I looked at the code it generated using GroupLayout and decided that by going that way you were basically locking yourself into Netbeans which was something I did not want to do.
I started by coding it manually using Swing. Now I use WYSIWYG editors, but I think it's important to know what's behind the editor. Also you might need to update the code manually, WYSIWYG editors often can't do exactly what you want.
Having created Java GUI's extensively, I can assure you the process is quite often painful. I'm well aware that Java's strength does not lie in it's GUI, but I'm surprised that a decent free interface builder tool hasn't been released.
Sometimes I'll use Eclipse's Visual Builder tool for quick and dirty mock-ups. It's code generation is a bit scary IMHO. I believe Netbean's Visual Editor is the best available at the moment (for free anyway); however, I find myself hand rolling GUI code for consistent cross-platform layouts. If your disapointed with these free GUI editors (like me), quite honestly, just use a layout library (like MIG) and just do it yourself. It'll be slow at first, but you'll have a lot more control and less editor newonses.
It really does depend on what you are trying to accomplish with the GUI. When I was tossing together ideas for a Computer Science class and testing functionality, the Netbeans WYSIWYG editor was great since it automatically generates a lot of the code for you. However, I found you tend to get better control with doing it by hand (in Java) than learning Netbeans.
I tried to use Eclipse's Visual Swing plugin, but on some occasions, the code it generated just disappeared, and I was left with a screen full of errors. In all the GUI apps I write, I use Netbeans, even though I hate the code generated when using GroupLayout. However, if layout code is not your concern, I think you'll be very pleased with the development speed it offers you. The only thing you'll have to do is implement the event logic and other logic you may require.
Eclipse's Visual Editor is a great choice, because the code that it generates is very straightforward and there's no hidden magic. Plus, you can make changes by hand and the editor will reflect them.
I test-drive the model of the UI, so that I have the functionality of the UI enclosed in a class that is completely decoupled from the GUI library and can be easily tested in isolation. Then I create a thin wrapper layer on top of the model, so that the GUI's event handlers are mostly one-liners that delegate to the UI model.
I've been using mostly IntelliJ IDEA's GUI builder (using the JGoodies Forms layout manager). It has been quite handly for laying out components in a static layout. But I think that for example with MiGLayout it's quite easy to write the GUI layout code by hand, so a GUI builder is not necessarily needed, and it helps to avoid tool lock-in. And dynamic layouts will anyways need to be written by hand.
But before writing any code, I first design and test a paper prototype of the UI, so as to have a clear vision of what needs to be done.
If you aim to create the final Java GUI, I recommand the Eclipse plugin named "Jigloo GUI Builder", which can generate clean and maintainable Java code.
If you just want to create the GUI quickly for review, you can try the UI prototyping tool like "ForeUI".
There's nothing wrong with using a GUI Designer when :
You understand what the IDE does and what it generates, how to customize the IDE output
You understand the code actually generated by IDE
Understanding at least the basics of Swing is important. Imagine the following scenario which happens just too often.
Q:"I have 10 years of experience writing swing applications"
A:ok
Q:How would you debug this code
A:Oh wait, there's no Netbeans form file??? You guys are not high tech!
Q:Hum.. you don't understand it?
A:Of course not, it's like machine code, you need to refractor it all and use an IDE!
I find that GUI builders can often complicate things and I'd rather know what was going on when the GUI was built than just use the variables created. I think because I don't know everything about Swing and layout managers as well, I am afraid to generate code that I have no conception of or don't know truly how it works.
When I was doing simple scripting using AutoIt that I knew would only be used on machines that had big enough screens I would use the GUI form editor. However, with commercial applications and those which may run on machines with any specifications I would generally shy away from GUI builders.
That said I think my decision may be influenced by my lack of knowledge regarding layout managers and maybe in the future I will start to embrace them more, as I can see nothing wrong with using them when you have a full understanding. Unlike some programmers may state, it is only a lazy way of building a GUI if you use the software with lazy intentions, and not for efficiently as the applications were written for.
To answer the original question directly, 99.5% of the time I will write the GUI from scratch!
I have an application of some 85 "frames" which was originally written with JBuilder 5 - an early IDE. The app is pure Java and I think it's all mostly Swing and AWT. So, the core question is: What IDEs can help me both maintain my existing application, possibly convert it from standalone to JSP, and hopefully also help with new development via a GUI interface?
Last summer ('08), I downloaded Eclipse and it sure beats JBuilder, except for the lack of a visual GUI WYSIWYG editor - the Visual Editor was dead even then. I like Ganymede (the current version) standard toolset, but lack of a visual editor concerns me. (And, I had a lot of trouble integrating it into an existing development environment.) While it lets you work with existing code, it didn't even have a (current) GUI editor, so working with my old code was the old-fashioned way ("blind").
In doing my homework, I found a company that makes/made a current-version Eclipse-based IDE that had a full-blown GUI environment that they claim make it easy to develop one GUI and then deploy it either as a stand-alone (pure Java) app, or deploy it as a web page (using JSP, etc). And, they suggested, it would let you work with existing applications, something none of the other systems do - that I've found so far. IIRC, it was about $250 for a license.
Unfortunately for me, life-events prevented action at that moment - long story short, I lost the link to their site. I thought it would be no problem to find them again, but the number of "plug-ins" and partners has EXPLODED! They now have nearly 1200 plug ins available and about 60 GUIs! YOWZER!
I came here to SO and got the idea from one of the several questions on "best IDE for Java" that NetBeans 6.5 is worth a look-see. I tried it. It's horrifically slow, even on a 3ghz box with 3G memory, etc. But, it integrated into the environment more quickly and I like its deployment details. I then found out that its GUI environment is only good for new code, and some here on SO suggest that it's a bit brittle and that if you have to hack it much (which I will need to do!) then it may break the ability of the GUI to continue to be editable in the IDE...
I've spent countless hours doing my homework on this, especially including looking here on SO and the web pages to which they often point. A lot of articles on Java IDE GUIs are old now, but I've read them anyway, and learned a lot...
Ideally, I'd like to find one tool that:
Competently, and without undue hassle works as a modern IDE for Java with a good GUI
Can help convert between types of applications - stand-alone vs JSP (mobile?)
Can work with existing applications (not written using that toolset).
Doesn't hook the code in to proprietary libraries.
If not in one tool, as multiple tools, it would still be nice to have all these abilities!
I do not require "free!"
Your input appreciated!
I suggest you look at Visual Editor again, as it should be able to work with existing code if this code is not too complex (in terms of business logic being mixed with the gui code).
Otherwise your time may be well spent in refactoring out the GUI code to a state where Visual Editor can handle it. I have not seen other free IDE's which can work with existing code.
NetBeans is powerful IDE for Java and have a good GUI builder.
If you already have Eclipse, I would recommend trying MyEclipse. This has a plug-in called Matisse4MyEclipse that is a nice GUI builder.
Between Eclipse/SWT or Netbeans/Matisse, what does either Java GUI editor give you in terms of rapid development and maintainability?
You are really asking two different questions: SWT vs Swing, and Eclipse GUI Editor vs Netbeans GUI Editor (Matisse).
First, the difference between SWT and Swing is that they are two fundamentally different GUI libraries. This akin to asking the difference between Tk and Win32, or Java Swing vs .NET Forms (not to say that SWT is .NET). There are a lot of discussions out there discussing SWT vs Swing--I don't know enough about SWT to summarize the differences.
First, let me say my bias is in favor of Netbeans and I have spent 10 years learning the IDE from its days as Forte.
As far as the GUI editor, Eclipse and Netbeans have functionally similar products, but implement the code in very different ways.
My observation is that Matisse behaves, functions, and produces code that's reminiscent of Visual Studio .NET code. There are clear initialziation sections and custom behaviors for certain objects (such as the JTable). You can "Customize" an object and add your own arbitrary code via the GUI editor very easily for everything from initialization to setting individual properties. For event handling, it defaults to replicating "delegates" in .NET by using anonymous inner classes and invoking a stand-alone method. The GUI editor itself provides detailed access to the form object model and has a rich set of customizations. You also have the freedom to drop non-GUI beans into the form for use by GUI components, such as models (tablemodel, listmodel, etc), JPA-related objects, Workers, etc. What used to take a week to produce with hand-coded SWING takes a day with Matisse (though you have to really learn Matisse to do this). If you've been hand-coding swing for many years, then relearning to use a GUI editor effectively is going to be a long, hard lession.
The code is highly maintainable from within Matisse; it is NOT intended to be edited outside of Matisse, but the code is suitable for editing if you needed to (many folks I know use Netbeans GUI and then copy the source into Eclipse).
The Eclipse GUI editor is a very different creature. The GUI editor(s) are roughly the same in terms of overall capability, but I have found them to be less polished. The layout capabilities are about equal, though errors are a bit less forgiving at times. Some customizations required me to go to the source file and edit the file directly, rather than getting access to code customizations through the GUI. The code produced is very different than Matisse. GUI Components are added and initialized through "getters" and is scattered throughout the file; this good because each component is isolated/grouped into a single function, but troublesome when you need to diagnose bad interactions between component initialization. The same goes with the event handlers--very different than matisse.
Eclipse also did not provide any protections from me editing/breaking/tampering with the produced GUI file where as Netbeans was almost obnoxious with its protections. As far as maintainability, the Eclipse code is probably a little closer to the way a human would produce Java code... personally, I find the code it produces harder to maintain, but I've been looking at Matisse generated code since the first beta so my opinion is hardly objective on this issue.
Netbeans also has the capability of using the same editor for building Swing framework applications, Netbeans RCP, etc... I am unsure if Eclipse does the same.
This is definitely subjective -- we use both, Eclipse and Netbeans. I think it comes down to a matter of preference.
No one can tell you which is better. This is completely subject to change per developer. Here's a google search for "Eclipse vs Netbeans" and you can look at some pros and cons which others have poured their thoughts into already. Eclipse vs. NetBeans
I think you should put more research into whether you want the resulting application to be SWT or Swing-based. Which IDE to use should be the least important factor.
I'm personally an Eclipse user, but I heard very good things about Matisse, so I would probably consider it if I had to build a Swing UI. BTW, if you buy MyEclipse, it integrates Matisse.
Some may contend that the end product you want to use actually depends on how easy it is to use - which is hinted at in the question.
This article suggests that the Netbeans/Matisse editor is easier to use - and so you should use it on your projects.
http://cld.blog-city.com/netbeans_matisse_versus_eclipses_visual_editor__no_contest.htm