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

DialogPane: Exception when both header and headerText are set

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8u40
    • Fix Version/s: 8u40
    • Component/s: javafx
    • Labels:
      None
    • Environment:

      Java 8u40 b03

      Description

      When both header and headerText are set on a DialogPane, the following exception is raised. See attached test case.

      java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:483)
      at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:363)
      at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:303)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:483)
      at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
      Caused by: java.lang.RuntimeException: Exception in Application start method
      at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:875)
      at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$146(LauncherImpl.java:157)
      at com.sun.javafx.application.LauncherImpl$$Lambda$48/1030870354.run(Unknown Source)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.IllegalArgumentException: Children: duplicate children added: parent = DialogPane@2214a939[styleClass=dialog-pane]
      at javafx.scene.Parent$2.onProposedChange(Parent.java:452)
      at com.sun.javafx.collections.VetoableListDecorator.add(VetoableListDecorator.java:206)
      at javafx.scene.control.DialogPane.updateHeaderArea(DialogPane.java:947)
      at javafx.scene.control.DialogPane.access$100(DialogPane.java:131)
      at javafx.scene.control.DialogPane$4.invalidated(DialogPane.java:457)
      at javafx.beans.property.StringPropertyBase.markInvalid(StringPropertyBase.java:109)
      at javafx.beans.property.StringPropertyBase.set(StringPropertyBase.java:143)
      at javafx.beans.property.StringPropertyBase.set(StringPropertyBase.java:49)
      at javafx.scene.control.DialogPane.setHeaderText(DialogPane.java:469)
      at testdialog1.TestDialog1.start(TestDialog1.java:31)
      at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$152(LauncherImpl.java:821)
      at com.sun.javafx.application.LauncherImpl$$Lambda$51/424497524.run(Unknown Source)
      at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$165(PlatformImpl.java:326)
      at com.sun.javafx.application.PlatformImpl$$Lambda$45/2117255219.run(Unknown Source)
      at com.sun.javafx.application.PlatformImpl.lambda$null$163(PlatformImpl.java:295)
      at com.sun.javafx.application.PlatformImpl$$Lambda$47/1328705350.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.javafx.application.PlatformImpl.lambda$runLater$164(PlatformImpl.java:294)
      at com.sun.javafx.application.PlatformImpl$$Lambda$46/1232367853.run(Unknown Source)
      at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)

        Attachments

          Activity

            People

            Assignee:
            jgiles Jonathan Giles
            Reporter:
            jcambon Jerome Cambon
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported: