I am running the shapes.fx code from JavaFX Tutorial lesson 1 by using javafx-sdk1.1-b03, got the compilation errors,
the code I got from: http://inkspb.russia.sun.com/FXDocs/Concepts/Franca/ui/overview/shapes.fx
C:\>javafx-sdk1.1\bin\javafxc shapes.fx
.\Color.fx:3: Color is already defined in this compilation unit
import javafx.scene.paint.Color;
^
shapes.fx:10: cannot find symbol
symbol : variable DARKSLATEGRAY
location: class Color
var stroke = Color.DARKSLATEGRAY;
^
shapes.fx:11: cannot find symbol
symbol : variable CADETBLUE
location: class Color
var fill = Color.CADETBLUE;
^
shapes.fx:12: cannot find symbol
symbol : variable GOLD
location: class Color
var alterfill = Color.GOLD;
^
shapes.fx:17: cannot find symbol
symbol : variable LINEN
location: class Color
fill: Color.LINEN;
^
5 errors
Looks to me, the code needs to be added
import javafx.scene.paint.Color;
After I added it, it compiles fine and runs OK.
So seems to me, the sample code should be standalone.
Attached is the modified code which Color package added.
the code I got from: http://inkspb.russia.sun.com/FXDocs/Concepts/Franca/ui/overview/shapes.fx
C:\>javafx-sdk1.1\bin\javafxc shapes.fx
.\Color.fx:3: Color is already defined in this compilation unit
import javafx.scene.paint.Color;
^
shapes.fx:10: cannot find symbol
symbol : variable DARKSLATEGRAY
location: class Color
var stroke = Color.DARKSLATEGRAY;
^
shapes.fx:11: cannot find symbol
symbol : variable CADETBLUE
location: class Color
var fill = Color.CADETBLUE;
^
shapes.fx:12: cannot find symbol
symbol : variable GOLD
location: class Color
var alterfill = Color.GOLD;
^
shapes.fx:17: cannot find symbol
symbol : variable LINEN
location: class Color
fill: Color.LINEN;
^
5 errors
Looks to me, the code needs to be added
import javafx.scene.paint.Color;
After I added it, it compiles fine and runs OK.
So seems to me, the sample code should be standalone.
Attached is the modified code which Color package added.