package myspring; import javafx.stage.Stage; import javafx.scene.Scene; import javafx.scene.text.Text; import javafx.scene.text.Font; import javafx.scene.paint.Color; var s1 = new Spring; var s2 = new Spring; s1.setColor(Color.RED); s1.setInitialPos(30, 10); s2.setColor(Color.VIOLET); s2.setInitialPos(150, 10); Stage { title: "Spring System" width: 450 height: 280 scene: Scene { fill: Color.BLACK content: [ s1,s2 ] } }