简体   繁体   中英

Netbeans GUI Builder

I have a rather large application. I have used the Netbeans GUI builder for most of the GUI work. Now that the project is starting to get large, I was wondering if this was advisable. Is it best to create the GUI's by hand so that I can have greater control over them? Is it advisable to stay away from the GUI builder or stick with it. Could you share some of your experience?

Thanks

EDIT:

See this is why I asked this question. It seems like different people all have their opions. Mine personally is that it works nice for small projects, but when things start to get complex, the GUI editor can be a hassle to use.

Absolutely, doing it by hand it preferred. The GUI Builder is handy for prototypes and quick throwaway code. Anything that is going to be maintained, customized or complex will be much less of a headache long-term if you do it by hand.

I like the Swing GUI builder and I do use it in a large project.

Really simple dialogs I just code "by hand".

When changing/creating more complex ones I prefer the GUI builder because I can immediately see how the form/dialog will look like.

Once you get the hang of the GUI builder I don't feel I have less control over it than when coding by hand.

GUI构建器可以使您的开发更快。

Stay miles away from the GUI Builder. You can have a poll with all developers who have worked with Netbeans GUI builder extensively, they will all share horror stories. Is this swing application?

Netbeans tried their hand on Visual JSF, just google it to see how it went?

Note: If its a swing application (or other desktop application), then please take my answer with a pinch of salt. I have not used netbeans GUI developer for that. But my general opinion is Netbeans tries to do a lot of things and does off of them badly.

Absolutely Netbeans GUI builder. Saves time and allows quick changes and control. Perfect for small or huge projects and group development. Unit testing and debugging is included. You can extend the GUI using your own beans. Everything is completely transparent. You can drop it and use an editor anytime you like, i bet you never will.

The Netbeans GUI Builder is one of the few GUI building tools that do their job right in my opinion. However, what is especially good about Netbeans is that it doesn't use any kind of intermediate library or custom XML format to store the generated GUI. It's plain Java code that gets generated. And this code looks sensible too, especially if you name your components sensibly, not just jLabel1 kind of stuff. This means that you can use the GUI Builder, then switch to maintaining the code manually later if you really want to.

Note that I never tried to perform anything like that, so there may be some problems I am unaware of. But then again I was always happy with the GUI Builder so I didn't really need to switch.

My very recent experience is with a large project that uses Netbeans GUI Builder-generated forms for panels.

Pros :

  • it is fast
  • it adds a layer of abstraction to GUI specific details

Cons :

  • it fastens developer's hands when it comes to fixing details in the generated code. Example from my very recent experience
  • UI controls are difficult to refactor
  • UI controls are impossible to extend and override

I would say it is not a good idea to use it in a large project, especially if reuse and extension of UI controls is expected(which almost always becomes the case for big projects).

I had the same problem with large Netbeans projects. In the GUI-Designer if I want to add an action I sometimes get the option "Set Action..." (on creation of a new GUI this is not available, just after opening Netbeans again). If you use this Netbeans creates in initComponents()

javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance().getContext().getActionMap(GUIClass.class, this);

All code after this will not be executed or just partly executed (I didn't examine it exactly). Use actionPerformed instead.

This works at the moment but Netbeans has to update this.

Our application has over 600 GUI-designed forms and we very rarely have any issues at all. If we do encounter problems, we usually just use SVN to discard the current changes and try again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM