JavaFX 2.2.25 Group.getChildren() is protected, so can't be used for adding Nodes

XMLWordPrintable

    • Type: Bug
    • Resolution: Cannot Reproduce
    • Priority: P4
    • None
    • Affects Version/s: 7u25
    • Component/s: javafx
    • Environment:

      Windows 7

      Don't know if also other versions of JavaFX are involed (just started using this version)
      In documentation and examples Group.getChildren().add(Node n) is used for adding nodes to a group.
      getChildren() is protected and therefore canot be used in an applicatin directly.
      getChildrenUnmodifiable() is public, but does not allow any add, since it is unmodifiable and gives
      java.lang.UnsupportedOperationException
      at java.util.AbstractList.add(AbstractList.java:148)
      at java.util.AbstractList.add(AbstractList.java:108)
      at de.cmk.jfx.Test2.start(Test2.java:47)

      So what is the correct way to add nodes to a group and why there is still the example in the documentation that getChildren().add(Node) is the way?

            Assignee:
            Pavel Ĺ afrata
            Reporter:
            J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: