(define control appletwin) (define T (textfield "http://www.cs.brandeis.edu/~luoy/cs155/hw2p.jsc" 50)) (define V (button "view")) (define E (button "Eval")) (add (box (box (col (row (label "URL") T) (grid 2 2 (label "view the code") V (label "run the program") E ) ) ) ) control) (validate control) (show control) (define (VA) (define view (window 700 200 "view")) (show view) (define TA (textarea "" 20 80)) (add TA view) (validate view) (write TA (readURL (readstring T))) ) (addCallback V VA control) (define (EA) (evalURL (readstring T))) (addCallback E EA control)