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

API inconsistency: getChildren().add(node) throws duplicate exception

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P3 P3
    • None
    • 8
    • javafx
    • b118, Windows 7 x64

      Earlier JavaFX was throwing an exception when node was added to the scenegraph twice.

      Currently it doesn't if the parent is different: automatic reparenting happens.

      However if the parent is the same then duplicate node exception is thrown.

      This is inconsistent and inconvenient as you always need to check whether this node is already present for this parent.

      A consistent behavior would be to move it in the children's list to the specified position (or to the end if position is not specified). Similar to removing from original parent.

            msladecek Martin Sládeček
            mrkam Alexander Kuznetcov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: