views:

251

answers:

3

Hi all. I'm making a AWT GUI for a simulation game. I have only been working with java for 2 years, and so have limited experience with building more complex GUIs. I have done a few simple ones, hard coded, and tried jigloo in eclipse. I am thinking of using MIG Layout, although some say I should really try and use jigloo more, or another GUI builder. I have designed the main game aspects, with a bar at the bottom. Right now it just has a few buttons which I've been using to test elements of the game. Obviously I need to now create a better interface for the user. Buttons that open panels with tabbed panels. Menus and such.

I am using swing for both the game and the controls

Any advice on how I should go about this? NetBeans is not very nice. I'm using eclipse as my IDE, so need a plugin for eclipse.

Thanks in advance!

A: 

You might want to consider using groovy and its swingbuilder library:

http://groovy.codehaus.org/Swing+Builder

Bryan Oakley
+1  A: 

I would suggest you give the latest version of NetBeans another shot. For making GUI's it really is easy. I've never seen another GUI builder that is so versatile.

Plus, it will keep your AWT/Swing objects separated so you will know which is which and will be able to avoid combining them.

leadingzero
I tried NetBeans about a month ago, and didn't like it then. I am now sure im using only swing.
Relequestual
NetBeans for swing is a very sensible suggestion.
How easy is it to then put that into eclipse?
Relequestual
I mean, can i design it in netbeans and then move the code or import it to eclipse? I just like eclipse better for coding.
Relequestual
I've used this approach on a couple projects--used Netbeans for prototyping and Eclipse for implementation. Also, I really like GroupLayout...even though it's for builders, I hand-code it and it works great. You can see how to do it in Netbeans, and then you'll really understand when you reimplement in Eclipse.
dave4351
thank you dave4351. I think I will try things out in netbeans to see how it could look, but end up using MiG, as it looks really powerful, and will probably become part of the JDK soon, as its voted 3rd most requested.
Relequestual
A: 

I personally prefer using the free JGoodies Form Layout and code the layout manually. When I have to build a new GUI I usually first draw it with pen & paper. After that I try to define the columns, gaps and rows for the FormLayout by drawing dotted lines. Sometimes the panel must be rearranged in multiple panels. Then I implement the GUI in Swing which is very easy then.

I don't use GUI builders very often because most of them just don't write the code in a way I want them to do. The NetBeans GUI builder also has the drawback, that it works with generated code which must not be edited by hand (or all changes are lost). Also NetBeans makes a lot of problems when you try to rearrange something (e.g. drag a field to another position). Sometimes everything is in a mess then.

At work we actually use the SwingDesinger for Eclipse from Instantiations. It allows bi-directional editing which is why we are using it. But unfortunately it is commercial. However I still prefer drawing and coding by hand... Maybe you give the JGoodies FormLayout a try.

Roland Schneider