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

JavaFX Tutorial Chapter 1 line.fx got compilation errors

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2
    • fx1.1
    • fx1.1
    • docs
    • None
    • WinXPpro SP3 with javafx-sdk1.1-b03

    Description

      I am compiling line.fx from JavaFX Tutorial lesson 1 which from
      http://inkspb.russia.sun.com/FXDocs/Concepts/Franca/ui/overview/line.fx

      Got compilation errors:
      C:\>javafx-sdk1.1\bin\javafxc line.fx
      .\Color.fx:3: Color is already defined in this compilation unit
      import javafx.scene.paint.Color;
      ^
      line.fx:10: cannot find symbol
      symbol : variable DARKSLATEGRAY
      location: class Color
      def stroke = Color.DARKSLATEGRAY;
                        ^
      line.fx:17: cannot find symbol
      symbol : variable LINEN
      location: class Color
                  fill: Color.LINEN;
                             ^
      3 errors

      The code needs to be added the import:
      import javafx.scene.paint.Color;

      After added the import, the code is running fine.
      Attached is modified code.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:
              Imported: