3
S8356: Java Swing User Experience with real code examples.
S8356: Java Swing User Experience with real code examples.
SHARE Technical Conference
March 7, 2000
TNL (Corrections since presented)
most recent update: March 29, 2000
- "Move" WindowExit class to INNER CLASS so can
reference other methods to do "graceful" shutdown.
-
Remove "static" from all method declarations (except main).
This error on my part made it necessary to declare all variables
used by multiple methods as static, because static methods can only
refer to static "class" variables.
-
Remove all "static" from variables, making them instance
variables rather than class variables. This does not make much
difference here since there should never be multiple "instances"
of JsrVote, but is better coding practice, and would be required if
there were multiple threads running JsrVote.
-
Remove most of set-up logic from main (because it must be static).
Instead invoke method init() from main, let it do setup.
This also mirrors the way the code would run if this were an applet
vs. an application.
- Change JsrLineIn:
Return to Presentation