IDE for Swing [closed]

对着背影说爱祢 提交于 2019-12-03 18:32:06

问题


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


回答1:


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).




回答2:


I like the Swing GUI Builder from the NetBeans IDE.




回答3:


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.




回答4:


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:




回答5:


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




回答6:


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




回答7:


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.




回答8:


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):

  1. Goto - menu HelpInstall New Software...
  2. Select - Work With: Juno - http://download.eclipse.org/releases/juno.
  3. 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.




回答9:


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

Matisse




回答10:


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.




回答11:


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.




回答12:


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




回答13:


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.




回答14:


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.




回答15:


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.




回答16:


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.




回答17:


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.




回答18:


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.




回答19:


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.




回答20:


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.




回答21:


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/




回答22:


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.




回答23:


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.




回答24:


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.




回答25:


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.




回答26:


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.




回答27:


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).




回答28:


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.




回答29:


window builder pro is good option and it is free also.




回答30:


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.



来源:https://stackoverflow.com/questions/26458/ide-for-swing

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!