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

UI Controls Doc: Example 14-2 for TreeView doesn't run

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: fx2.1
    • Fix Version/s: 7u6
    • Component/s: docs

      Description

      User feedback:
      example 14-2 keeps crashing every time I try to run it. The compilation process does not find any errors, but I receive this error when Netbeans intends to start the application.
      I have tried even with a clean installation of Windows XP, with just Netbeans 7.1.2 and JDK 7 u 4.

      Exception in Application start method
      Exception in thread "main" java.lang.RuntimeException: Exception in Application start method
              at com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown Source)
              at com.sun.javafx.application.LauncherImpl.access$000(Unknown Source)
              at com.sun.javafx.application.LauncherImpl$1.run(Unknown Source)
              at java.lang.Thread.run(Thread.java:722)
      Caused by: java.lang.NullPointerException
              at javafx.scene.control.TreeView.getItem(Unknown Source)
              at javafx.scene.control.TreeView.getTreeItem(Unknown Source)
              at javafx.scene.control.TreeCell.updateItem(Unknown Source)
              at javafx.scene.control.TreeCell.access$000(Unknown Source)
              at javafx.scene.control.TreeCell$1.invalidated(Unknown Source)
              at com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(Unknown Source)
              at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(Unknown Source)
              at javafx.beans.property.ReadOnlyIntegerWrapper$ReadOnlyPropertyImpl.fireValueChangedEvent(Unknown Source)
              at javafx.beans.property.ReadOnlyIntegerWrapper.fireValueChangedEvent(Unknown Source)
              at javafx.beans.property.IntegerPropertyBase.markInvalid(Unknown Source)
              at javafx.beans.property.IntegerPropertyBase.set(Unknown Source)
              at javafx.scene.control.IndexedCell.updateIndex(Unknown Source)
              at com.sun.javafx.scene.control.skin.VirtualFlow.setCellIndex(Unknown Source)
              at com.sun.javafx.scene.control.skin.VirtualFlow.addTrailingCells(Unknown Source)
              at com.sun.javafx.scene.control.skin.VirtualFlow.layoutChildren(Unknown Source)
              at javafx.scene.Parent.layout(Unknown Source)
              at javafx.scene.Parent.layout(Unknown Source)
              at javafx.scene.Parent.layout(Unknown Source)
              at javafx.scene.Parent.layout(Unknown Source)
              at javafx.scene.Scene.layoutDirtyRoots(Unknown Source)
              at javafx.scene.Scene.doLayoutPass(Unknown Source)
              at javafx.scene.Scene.preferredSize(Unknown Source)
              at javafx.scene.Scene.impl_preferredSize(Unknown Source)
              at javafx.stage.Window.adjustSize(Unknown Source)
              at javafx.stage.Window.access$1000(Unknown Source)
              at javafx.stage.Window$10.invalidated(Unknown Source)
              at javafx.beans.property.BooleanPropertyBase.markInvalid(Unknown Source)
              at javafx.beans.property.BooleanPropertyBase.set(Unknown Source)
              at javafx.stage.Window.setShowing(Unknown Source)
              at javafx.stage.Window.show(Unknown Source)
              at javafx.stage.Stage.show(Unknown Source)
              at javafxapplication1.TreeViewSample.start(TreeViewSample.java:68)
              at com.sun.javafx.application.LauncherImpl$5.run(Unknown Source)
              at com.sun.javafx.application.PlatformImpl$4.run(Unknown Source)
              at com.sun.javafx.application.PlatformImpl$3.run(Unknown Source)
              at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
              at com.sun.glass.ui.win.WinApplication.access$100(Unknown Source)
              at com.sun.glass.ui.win.WinApplication$2$1.run(Unknown Source)
              ... 1 more
      Java Result: 1

        Attachments

          Activity

            People

            • Assignee:
              aredko Alla Redko (Inactive)
              Reporter:
              nhildebrandt Nancy Hildebrandt (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: