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

It is not clear how to reproduce IllegalArgumentException in java.awt.Container.addImpl()

XMLWordPrintable

    • b45
    • generic
    • windows_xp
    • Verified

      The specification for java.awt.Container.addImpl(Component comp, Object constraints, int index) says:
      "Throws:
          IllegalArgumentException - if comp has been added to the Container more than once".
      Could you get an example which reproduces specified behavior?

      Actually, if I try to add the Container more than once, then this part of specification takes effect:
      " Note that if the component already exists in this container or a child of this container, it is removed from that container before being added to this container".
      So, I can't understand how I can reproduce IllegalArgumentException.



      ###@###.### 2005-04-05 11:15:28 GMT

            dav Andrei Dmitriev (Inactive)
            ynovozhi Yulia Novozhilova (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: