This is not the Ultimate Scripting Language

We had to write libraries to hide the direct Javadot access.
(load "jlib/Swing.scm") ;a little functional language for GUI creation

(define w 
  (window "Test"
    (button "exit" red 
(.pack w) 
(.show w)
Resulting code is much simpler than straight JScheme + javadot
(import "javax.swing.*")
(define w (JFrame. "Test"))
(define eb (JButton. "Exit"))
(.setBackground eb$)
(.addActionListener eb 
   (Listener. (lambda(e) (System.exit 0))))
(.add (.getContentPane w) eb) 
(.pack w) (.show w)


back to top

set preferences

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