continue

Case Study 1: GUI building with JLIB
Flexible widget constructors lighten the code

(define b
   (button "abc"                               ;; string is button label
           (color 255 80 10)                   ;; background color
           (action (lambda(e) (.hide w)))      ;; action function
           (HelveticaBold 24)                  ;; font
           (lambda(t) (.setForeground t blue)) ;; general property setting
      )

The earlier GUI example in other scripting languages
Jython uses variable=value pairs in arg list
Perl/TK uses -property ==> value pairs in arg list
continue


back to top


set preferences

LL2, Saturday 9 November 2002, Tim Hickey/Ken Anderson