rxApp=.RexxApplication~new jrxApp=BSFCreateRexxProxy(rxApp, ,"javafx.application.Application") jrxApp~launch(jrxApp~getClass, .nil) ::requires "BSF.CLS" ::class RexxApplication ::method start use arg primaryStage primaryStage~setTitle("Hello from Group 8") colorClz=bsf.loadClass("javafx.scene.paint.Color") cdClz=bsf.loadClass("javafx.scene.control.ContentDisplay") alClz=bsf.loadClass("javafx.geometry.Pos") root=.bsf~new("javafx.scene.layout.AnchorPane") root~prefHeight=500 root~prefWidth=1100 lbl=.bsf~new("javafx.scene.control.Label") lbl~textFill=colorClz~RED lbl~setLayoutX(250) lbl~setLayoutY(500) lbl~prefHeight="16.0" lbl~prefWidth="248.0" lbl~contentDisplay=cdClz~CENTER lbl~alignment=alClz~valueOf("CENTER") btn=.bsf~new("javafx.scene.control.Button") btn~textFill=colorClz~RED btn~layoutX= 500 btn~layoutY= 250 btn~text="Do Not Click Me!" rh=.RexxButtonHandler~new(lbl) jrh=BSFCreateRexxProxy(rh, ,"javafx.event.EventHandler") btn~setOnAction(jrh) root~getChildren~~add(btn)~~add(lbl) primaryStage~setScene(.bsf~new("javafx.scene.Scene", root)) primaryStage~show ::class RexxButtonHandler ::method init expose label use arg label ::method handle expose label label~layoutX= random(0,1000) label~layoutY= random(0,500) label~text="Stop clicking the Button!!!"