Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8106371

JavaFX Tutorial Chapter 1 effects.fx got compilation errors

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • fx1.1
    • fx1.1
    • docs
    • None
    • WinXPpro SP3 with fanaca b03

      I am compiling the code effects.fx which from JavaFX Tutorial lesson 1 on page
      http://inkspb.russia.sun.com/FXDocs/Concepts/Franca/ui/overview/effects.fx
      by using javafx 1.1-b03 promotion build, I got the following errors:

      C:\>javafx-sdk1.1\bin\javafxc effects.fx
      .\Color.fx:3: Color is already defined in this compilation unit
      import javafx.scene.paint.Color;
      ^
      effects.fx:29: cannot find symbol
      symbol : variable RED
      location: class Color
              Circle{centerX: 30 centerY:40 radius:20 fill: Color.RED opacity: 0.8 c
      ursor: Cursor.HAND},
                                                                   ^
      effects.fx:30: cannot find symbol
      symbol : variable WHITE
      location: class Color
              Line {startX: 20 startY: 30 endX: 40 endY: 50 stroke: Color.WHITE stro
      keWidth: 2},
                                                                           ^
      effects.fx:31: cannot find symbol
      symbol : variable WHITE
      location: class Color
              Line {startX: 20 startY: 50 endX: 40 endY: 30 stroke: Color.WHITE stro
      keWidth: 2}
                                                                           ^
      effects.fx:33: cannot find symbol
      symbol : variable BLACK
      location: class Color
          effect: DropShadow{offsetX:5 offsetY:5 color: Color.BLACK}
                                                             ^
      effects.fx:37: cannot find symbol
      symbol : variable RED
      location: class Color
              Circle{centerX: 50 centerY:40 radius:20 fill: Color.RED opacity: 0.8 }
      ,
                                                                   ^
      effects.fx:38: cannot find symbol
      symbol : variable WHITE
      location: class Color
              Line {startX: 40 startY: 30 endX: 60 endY: 50 stroke: Color.WHITE stro
      keWidth: 2},
                                                                           ^
      effects.fx:39: cannot find symbol
      symbol : variable WHITE
      location: class Color
              Line {startX: 40 startY: 50 endX: 60 endY: 30 stroke: Color.WHITE stro
      keWidth: 2}
                                                                           ^
      effects.fx:41: cannot find symbol
      symbol : variable BLACK
      location: class Color
          effect: InnerShadow{offsetX:5 offsetY:5 color: Color.BLACK}
                                                              ^
      effects.fx:45: cannot find symbol
      symbol : variable RED
      location: class Color
              Circle{centerX: 40 centerY:40 radius:20 fill: Color.RED opacity: 0.8 e
      ffect: DropShadow{offsetX:5 offsetY:5 color: Color.BLACK}},
                                                                   ^
      effects.fx:45: cannot find symbol
      symbol : variable BLACK
      location: class Color
              Circle{centerX: 40 centerY:40 radius:20 fill: Color.RED opacity: 0.8 e
      ffect: DropShadow{offsetX:5 offsetY:5 color: Color.BLACK}},

                                                        ^
      effects.fx:46: cannot find symbol
      symbol : variable WHITE
      location: class Color
              Line {startX: 30 startY: 30 endX: 50 endY: 50 stroke: Color.WHITE stro
      keWidth: 2},
                                                                           ^
      effects.fx:47: cannot find symbol
      symbol : variable WHITE
      location: class Color
              Line {startX: 30 startY: 50 endX: 50 endY: 30 stroke: Color.WHITE stro
      keWidth: 2}
                                                                           ^
      effects.fx:49: cannot find symbol
      symbol : variable BLACK
      location: class Color
          effect: InnerShadow{offsetX:5 offsetY:5 color: Color.BLACK}
                                                              ^
      effects.fx:54: cannot find symbol
      symbol : variable RED
      location: class Color
              Circle{centerX: 30 centerY:40 radius:20 fill: Color.RED opacity: 0.8},

                                                                   ^
      effects.fx:55: cannot find symbol
      symbol : variable WHITE
      location: class Color
              Line {startX: 20 startY: 30 endX: 40 endY: 50 stroke: Color.WHITE stro
      keWidth: 2},
                                                                           ^
      effects.fx:56: cannot find symbol
      symbol : variable WHITE
      location: class Color
              Line {startX: 20 startY: 50 endX: 40 endY: 30 stroke: Color.WHITE stro
      keWidth: 2}
                                                                           ^
      effects.fx:60: cannot find symbol
      symbol : variable DARKBLUE
      location: class Color
              topInput: DropShadow {offsetX: 4 offsetY: 4 radius: 6 color: Color.DARKB
      LUE}
                                                                                ^
      effects.fx:61: cannot find symbol
      symbol : variable DARKMAGENTA
      location: class Color
              bottomInput: DropShadow {offsetX: -4 offsetY: 4 radius: 6 color: Color.D
      ARKMAGENTA}
                                                                                    ^
      effects.fx:68: cannot find symbol
      symbol : variable RED
      location: class Color
              Circle{centerX: 30 centerY:20 radius:20 fill: Color.RED opacity: 0.9},

                                                                   ^
      effects.fx:69: cannot find symbol
      symbol : variable WHITE
      location: class Color
              Line {startX: 20 startY: 10 endX: 40 endY: 30 stroke: Color.WHITE stro
      keWidth: 2},
                                                                           ^
      effects.fx:70: cannot find symbol
      symbol : variable WHITE
      location: class Color
              Line {startX: 20 startY: 30 endX: 40 endY: 10 stroke: Color.WHITE stro
      keWidth: 2}
                                                                           ^
      effects.fx:77: cannot find symbol
      symbol : variable RED
      location: class Color
              Circle{centerX: 30 centerY:20 radius:20 fill: Color.RED opacity: 0.9},

                                                                   ^
      effects.fx:78: cannot find symbol
      symbol : variable WHITE
      location: class Color
              Line {startX: 20 startY: 10 endX: 40 endY: 30 stroke: Color.WHITE stro
      keWidth: 2},
                                                                           ^
      effects.fx:79: cannot find symbol
      symbol : variable WHITE
      location: class Color
              Line {startX: 20 startY: 30 endX: 40 endY: 10 stroke: Color.WHITE stro
      keWidth: 2}
                                                                           ^
      effects.fx:86: cannot find symbol
      symbol : variable RED
      location: class Color
              Circle{centerX: 30 centerY:20 radius:20 fill: Color.RED opacity: 0.9},

                                                                   ^
      effects.fx:87: cannot find symbol
      symbol : variable WHITE
      location: class Color
              Line {startX: 20 startY: 10 endX: 40 endY: 30 stroke: Color.WHITE stro
      keWidth: 2},
                                                                           ^
      effects.fx:88: cannot find symbol
      symbol : variable WHITE
      location: class Color
              Line {startX: 20 startY: 30 endX: 40 endY: 10 stroke: Color.WHITE stro
      keWidth: 2}
                                                                           ^
      effects.fx:94: cannot find symbol
      symbol : variable RED
      location: class Color
              Circle{centerX: 30 centerY:20 radius:20 fill: Color.RED opacity: 0.9},

                                                                   ^
      effects.fx:95: cannot find symbol
      symbol : variable WHITE
      location: class Color
              Line {startX: 20 startY: 10 endX: 40 endY: 30 stroke: Color.WHITE stro
      keWidth: 2},
                                                                           ^
      effects.fx:96: cannot find symbol
      symbol : variable WHITE
      location: class Color
              Line {startX: 20 startY: 30 endX: 40 endY: 10 stroke: Color.WHITE stro
      keWidth: 2}
                                                                           ^
      effects.fx:110: cannot find symbol
      symbol : variable DARKGREEN
      location: class Color
                  Stop{offset: 0.3 color: Color.DARKGREEN},
                                               ^
      effects.fx:111: cannot find symbol
      symbol : variable WHITE
      location: class Color
                  Stop{offset: 1.0 color: Color.WHITE}
                                               ^
      effects.fx:121: cannot find symbol
      symbol : variable DARKGREEN
      location: class Color
                  Stop{offset: 0.3 color: Color.DARKGREEN},
                                               ^
      effects.fx:122: cannot find symbol
      symbol : variable WHITE
      location: class Color
                  Stop{offset: 1.0 color: Color.WHITE}
                                               ^
      effects.fx:127: cannot find symbol
      symbol : variable YELLOW
      location: class Color
              input: InnerShadow {offsetX: 4 offsetY: 4 radius: 6 color: Color.YELLOW}

                                                                              ^
      effects.fx:133: cannot find symbol
      symbol : variable SEAGREEN
      location: class Color
      var reflection = Text{x: 10 y: 42 content: "Reflection" fill: Color.SEAGREEN fon
      t: Font{size:20 name: "Verdana"}
                                                                         ^
      effects.fx:183: cannot find symbol
      symbol : variable FLORALWHITE
      location: class Color
              fill: Color.FLORALWHITE
                         ^
      38 errors

      Need to be fixed.
      The code as attached

            aredko Alla Redko (Inactive)
            ttzhang Tao Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: