This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Most important / difficult GUI concepts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Most important / difficult GUI concepts" Watch "Most important / difficult GUI concepts" New topic
Author

Most important / difficult GUI concepts

Bert Bates
author
Sheriff

Joined: Oct 14, 2002
Posts: 8875
    
    5
Hi Guys,

Let's say you've got a friend who's a programmer, but not a GUI programmer...

Now let's say that you want to teach her how to code GUIs... what are the top X (where X is 3-10), topics or concepts, that are necessary to really "get" GUI programming.

I'll start with a few ideas:

1 - It's important to be really solid with the idea of events and callbacks
2 - It's important to have a decent handle on the basics of MVC

Others?

Thanks,

Bert


Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4642
    
    5

If we're talking Swing (or even AWT):

-- Don't block the EDT. Understand the single threaded rule.
-- Don't use a null layout. Learn how to use layout managers.
-- Don't use a visual designer. At least, not until you know enough to be able to read and understand the auto-generated code.

luck, db
There are no new questions, but there may be new answers.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> what are the top X (where X is 3-10), topics or concepts, that are necessary to really "get" GUI programming.

1) events
2) [daylight]
3) layout managers
4) renderers
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Darryl Burke wrote:If we're talking Swing (or even AWT):

-- Don't block the EDT. Understand the single threaded rule.


Nearly all the UI toolkits I've worked with are single threaded. So I think covering this is important, and rather, threading in general, regardless of the toolkit.


GenRocket - Experts at Building Test Data
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

- Being native.

By that I mean, adhere to the target OS's guidelines for UI's as much as possible. For Apple, this seems to be vital if you want your apps accepted in the app store.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

Indeed, threading (e.g Swing's EDT) is a very important concept to understand. Otherwise, your friend will end up with frozen screen, ArrayOutOfBoundsException and all sort of hair-pulling troubles.


[My Blog]
All roads lead to JavaRanch
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10486
    
    9

In addition to what has been already cited (everyone +1)
Event handling
Custom painting and the Graphics class
Renderers and Editors


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Most important / difficult GUI concepts