Quote: The GUIController object handles the drawing and event handling of all the components it contains. I can simply add some logic for handling enabling/disabling and showing/hiding the container. This also gives Tab-panes for free because each pane can be a container.
It may make sense to make a separate container class, independent of the control heirarchy. If nothing else, for proper encapsulation, but for future extension as well. And also, presumably you'd want to be able to have multiple containers independent of each other, or containers that are individually hidden or shown (again, like a menu).
Menus seem quite important as they offer UI elements that do not obscure the sketch. controlP5 allows hiding and showing, but in a very non-standard way for end users.
Yes, lightweight and simple APIs seem like the right approach. Ultimately, it seems that a solid GUI toolkit would contain:
menus (with submenus)
buttons
radio buttons
text fields (including multiline)
drop menus
sliders
knobs (processing totally needs knobs, for some reason)
containers
As for event handling, I am a big fan of Actions, a la Swing, where you instance your own object that has some action method, and can pass this same object to multiple GUI elements (as with a menu item and button serving same purpose). You end up with the very learning-friendly API something like myButton.setAction(myActionObject). I suppose a step further would be passing a single function, but function passing always gets into hinky syntax or reflection that may confuse students. There's something I don't like about setCommand("myFunctionName") from a code purist stance. Likewise I'm not so sure about wrapping too closely the Java ActionEvent stuff, since this either means the learning student is *supposed* to learn more Java, or worse, the API is mutated or simplified such that someone who actually does know Java GUI stuff finds things confusing and not working as they would expect.
I will continue to throw in thoughts here, rather than contribute any actual code : )
You have a valid point about layout managers, though they are less work to implement than external GUI layout tools. But then here's a chance to do it better than Sun! I think, truthfully, that learning to use layout managers, they become less work than absolute positioning of everything, although I suppose most sketches are absolute-sized...