JDK-6250592 : It is not clear how to reproduce IllegalArgumentException in java.awt.Container.addImpl()
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: generic
  • Submitted: 2005-04-05
  • Updated: 2017-05-16
  • Resolved: 2005-07-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b45Fixed
Related Reports
Relates :  
Description
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

Comments
EVALUATION specification about IAE when components adds twice should be removed. ###@###.### 2005-05-25 12:23:05 GMT
25-05-2005