(fastload "jlib.Java") (define win thisApplet) (setbackground thisApplet (color 100 150 200)) (define L (label "Computing On Base Percentage")) (define A (textfield "" 20)) (define B (textfield "" 20)) (define C (textfield "" 20)) (add thisApplet (col (setfont L "Times" 1 30) (label "ON BASE PERCENTAGE") (row (label "Number of times on base:") A) (row (label "Number of appearances at the plate:") B ) (pad (button "Compute On Base Percentage") (lambda (e) (writeExpr C ( / (readExpr A)(readExpr B) ) ) ) )C ) (row (label "Actual On Base Percentage:") C ) ) (validate thisApplet) (show thisApplet)