Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

NuffSaid

[java] Preferred GUI design method

This topic is 5730 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm interested to know how most people design the GUI in Java? Do you use GUI builders like Netbeans, or do you manually code them? I've been writing GUIs in Java using Layout Managers, specifically BoxLayout, and quite frankly, its never caught on with me. GUI builders I've tried seem to work best when using the NULL layout. Using any other layout in a GUI builder just doesn't seem to work. I'm interested if anyone else feels that layout managers are a pain to use, and if there are any other alternatives? [edited by - NuffSaid on December 7, 2002 7:50:56 PM]

Share this post


Link to post
Share on other sites
Advertisement
I like to handcode them GUIs, but haven't tried any other way of designing GUIs with java. I'm quite happy with BorderLayout in most cases. If you don't specify which layout you are using, I think it's just using the FlowLayout:

http://java.sun.com/j2se/1.4/docs/api/java/awt/FlowLayout.html

As longs a you just do small games, I don't think you really need to use anything but BorderLayout or BoxLayout, if any.

[edited by - hotohori on December 8, 2002 10:48:55 AM]

Share this post


Link to post
Share on other sites
I handcode mine. The GUI builders I''ve tried have ranged from "not quite there" to "frustrating". I usually use a combination of JPanel with FlowLayouts and JFrames with a BorderLayout. It also gets you cleaner code.



50% of people are below average.

Share this post


Link to post
Share on other sites
I''ve been revisiting GridBagLayouts, and I think that they seem to work. Sort of. Once you get used to Insets, and grid coordinates.

Guess I''ll be using that for now.

Share this post


Link to post
Share on other sites
Hi,

I started creating GUIs armed only with TextPad and all went fine. Well ... until I tried NetBeans. It''s not that you couldn''t produce some c00l layout manually, it''s all about time.
Creating a JFrame (with a few inputs & some basic functionallity) manually can take some 15 minutes, but using some GUI builder it''s much faster - about three times faster for me.
The transition to GUI-builder creating the user interface was not easy. I refused to give up nursing the nice, small, innocent handcrafted components (hehe, but that''s how I really felt it those days)
But if you really have some idea (read - design), how that frame should look and what it should do, you''re better off with visual GUI creation.

I personally use NetBeans throughout my projects and also for the GUI.

have fun

Petr Stedry

Share this post


Link to post
Share on other sites
I am using Netbeans. The GUI builder works fine, for a Java GUI builder. But it still isn''t great, especially if you''re used to products like Delphi and C++ Builder.

But guess that''s what I''ll use

Share this post


Link to post
Share on other sites
Don''t get caught up being tied to a single layout manager on a single level. Layout managers were meant to be used together by nesting them inside one another.



Make it work, then
make it fast.

"I’m happy to share what I can, because I’m in it for the love of programming. The Ferraris are just gravy, honest!" --John Carmack: Forward to Graphics Programming Black Book

Share this post


Link to post
Share on other sites
Hi,

why not use GridBagLayout as much as possible?
If anyone likes to nest 4-7 layouts deep just to have a nice looking GUI, why spoil the fun? But I personally prefer not to spend all my time on pushing components around from one container to the next. And this all just to have this Flow-in-Border-in-Box-in-GridLayout frame look sooooo pretty.

NuffSaid> Some time ago, I tried JBuilder (I think it was v4) and it''s GUI builder was quite a lot better than that of NetBeans. But the code completion engine and many other features (error trackin, debugging & price ) were inferior, compared to NetBeans. And that''s why I use NetBeans now.

have a nice day

Petr Stedry

Share this post


Link to post
Share on other sites
quote:
Original post by NuffSaid
I''m interested to know how most people design the GUI in Java? Do you use GUI builders like Netbeans, or do you manually code them?

I''ve been writing GUIs in Java using Layout Managers, specifically BoxLayout, and quite frankly, its never caught on with me. GUI builders I''ve tried seem to work best when using the NULL layout. Using any other layout in a GUI builder just doesn''t seem to work. I''m interested if anyone else feels that layout managers are a pain to use, and if there are any other alternatives?

[edited by - NuffSaid on December 7, 2002 7:50:56 PM]


It depends on what I doing. If I am writting something more complex I''ll use a program like JBuilder (personal edition) and draw GUI like you do in VB, but if it''s simple I''ll just write the code to use the layout managers myself.


I agree layout managers can be a pain, but I am unaware of any other way to setup a GUI with Java.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!