Skip to main content

GUI Newbie

4 replies [Last post]

I'm fairly familiar with Java but can someone help me understand the basics of GUI building in Java? I know it's a really newbie related question but I just would like to understand the basics of how to do this. Thanks, Jeremy

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2003-06-11


There's a bunch of ways to learn Swing: the official tutorial, Swing books, general UI books, looking at other UIs, digging into the code of public sample applications.

Before you start coding your first GUI, you may check out my Metamorphosis app to learn about some don'ts and do's in Swing design/implementation. You can find more demos in my freeware section. And you can find many other Swing applications at Sun's Swing Sightings page. Looking at all these apps can help you learn about good and bad visual design.

To learn about the Swing basics you can download Sun's official Swing tutorial. It aquaints you with basic and advanced concepts. As an alternative or complement you may read a book; and many people like the Swing book by Robinson & Vorobiev. If you are not familiar with UI components at all, you may read Jeff Johnson's 'GUI Bloopers' first.

And later, you can come back and ask here about all the stuff you couldn't find in the sources mentioned above.

Hope this helps, Karsten

Metamorphosis -
More Demos -
Swing Sightings -
Swing Tutorial -
Swing Book -
GUI Bloopers -


Thanks alot. I appreciate your post. Do you have any information about the proper practices behind the classing of a GUI? Does that make sense? Thanks, Jeremy

Joined: 2003-06-11

> Do you have any information about the proper practices
> behind the classing of a GUI? Does that make sense?

The Swing book by Robinson & Vorobiev explains some good practices. In my articles section, you can find presentations about layout and Swing don't and do's, see

Also, I provide products that use and demonstrate good practice patterns for Swing applications. I hesitate to mention this in tips in public forums, just because I still charge for them.

I will open source Swing sample applications later this year here at So you can learn from it; and we all can discuss the patterns and different approaches: how to manage resources, how to work with actions, how to implement event handling and how to separate a domain from the presentation.



Once again, thanks for your very informative post. I have downloaded a few Swing Tutorials and Swing Books in hopes of learning the best/common practices of building GUI in Java. Say, if you don't mind my asking, what do you use to build your GUI in Java? I know that some applications have a similar ability to Visual Basic where you can design your form and then code it. Do you do somthing like that or do you doing it all from code? Thanks alot, Jeremy