Created
April 17, 2013 14:48
-
-
Save RCura/94e8e5e8add8a6ebb8ab to your computer and use it in GitHub Desktop.
drge
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package rcfx | |
| import scalafx.Includes._ | |
| import scalafx.application.JFXApp | |
| import scalafx.scene.Scene | |
| import scalafx.scene.paint.Color | |
| import scalafx.scene.shape.Rectangle | |
| import scalafx.stage.Stage | |
| object World extends JFXApp { | |
| stage = new JFXApp.PrimaryStage { | |
| title = "Hello World" | |
| width = 600 | |
| height = 450 | |
| scene = new Scene { | |
| fill = Color.LIGHTGREEN | |
| root = new Rectangle { | |
| x = 25 | |
| y = 40 | |
| width = 100 | |
| height = 100 | |
| fill <== when(hover) then Color.GREEN otherwise Color.RED | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment