COMP 310
Spring 2010
Lec02: GUI Building, Designing Ballworld
GUI Building
Demo using Eclipse with Jigloo
Making a project
Making a frame with a
main()
method
Frame layouts: Border layout
Dropping in
Panels
Buttons
Text fields
Giving a button click behavior
Ballworld Design
The separation of variant and invariant:
What is an abstract ball?
Methods
What about fields? Does anyone on the outside care?
Concrete
ABall
implementations
Union Design Pattern
(see also:
http://cnx.org/content/m11796/latest/
)
Animation technique
Timer
Observer-observable
Call-back lambdas
Design as an Iterative Process
Never satisfied!
Moving towards
Model-View-Controller
© 2010 by Stephen Wong