Maintenance Notice

The bugs.java.com site will be undergoing maintenance on 15th Dec 2017 21:00 PST to 16th Dec 2017 1:00 AM PST.
JDK-8003398 : IllegalArgumentException: adding a container to a container on a different GraphicsDevice
  • Type: Bug
  • Component: security-libs
  • Affected Version: 7,8,9
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • Submitted: 2012-11-14
  • Updated: 2017-05-22
  • Resolved: 2017-05-22
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 Availabitlity Release.

To download the current JDK release, click here.
JDK 10
10Resolved
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Description
This is a bug in java 1.7 and happens when you add a Component to a Container on another graphics device, without explicitly removing the Component from its previous parent.

See this NetBeans issue for more details and sample code to reproduce: http://netbeans.org/bugzilla/show_bug.cgi?id=222051
Comments
Reopen it. Customer provided requested info
2017-05-03

trace files
2017-05-02

already addressed by JDK-8160696 in 9. JDK-8160696 is back-ported to 8 in 8u152 and to 7 in 7u131.
2017-05-01

- this is an issue reported against 7(7u), - there are now affected version 9 filed for this issue - 7u issues are transferred to Sustaining Nevertheless if someone have a report against 9 - please reopen and add affectedVersion 9 or 7u specific escalations might be reopen to Sustaining
2014-08-10

- this is an issue reported against 7(7u), - there are now affected version 9 filed for this issue - 7u issues are transferred to Sustaining Nevertheless if someone have a report against 9 - please reopen and add affectedVersion 9 or 7u specific escalations might be reopen to Sustaining
2014-08-10

These are all approved for deferral to JDK 9 so you can update the FixVersion to state JDK 9. Kind regards, Mathias
2013-08-29

These are all approved for deferral to JDK 9 so you can update the FixVersion to state JDK 9. Kind regards, Mathias
2013-08-29

These are all approved for deferral to JDK 9 so you can update the FixVersion to state JDK 9. Kind regards, Mathias
2013-08-29

Converted "8-client-defer-candidate" label to "8-defer-request" by SQE' OK.
2013-08-15

*This is anti-deferral criteria list*: - P2 -------------- Engineering's Criteria ------------------------------------- - tck-red labeled - conformance labeled - P3 regressions reported/labeled against jdk8 - findbugs, parfait, eht labeled bugs - CAP <1 year reported - netbeans <1 year reported Victor ----------------- SQE's OK --------------------------------- Yes, we are ok with that thanks, Mikhail
2013-08-15

8-defer-request: This is the issue reproduced from 7 GA, this is not a regression in 8, requesting to defer because there are no customer escalations on this issue.
2013-06-17

Bug reproduced since jdk 7 FCS
2012-11-21

> I am not sure what should be in stringID. Reassigning to 2D team. Its a different string that's all that matters. The root cause of this is the AWT fix in JDK 7 b55 fix in early 2009 for :- https://jbs.oracle.com/bugs/browse/JDK-6804747 "Ensure consistent graphicsConfig member across components hierarchy FWIW the netbeans test case assumes Xinerama but I was able to modify the program to get the exception on Solaris 10 SPARC in non-xinerama mode ..
2012-11-19

I am not sure what should be in stringID. Reassigning to 2D team. JDK-7124231 was closed as a not reproducible issue. I have found the next workaround http://orangepalantir.org/topicspace/index.php?idnum=55 may be a problem here is similar to this issue JDK-4733263
2012-11-15

There's sample code attached to NetBeans bug that reproduces the problem - it isn't that hard to run that code... Here's the stack trace anyway: Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: adding a container to a container on a different GraphicsDevice at java.awt.Component.checkGD(Component.java:1178) at java.awt.Container.addImpl(Container.java:1086) at java.awt.Container.add(Container.java:998) at javax.swing.JFrame.addImpl(JFrame.java:562) at java.awt.Container.add(Container.java:966) at javaapplication19.TestCanvas$2.actionPerformed(TestCanvas.java:41) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at java.awt.Component.processMouseEvent(Component.java:6505) at javax.swing.JComponent.processMouseEvent(JComponent.java:3321) at java.awt.Component.processEvent(Component.java:6270) at java.awt.Container.processEvent(Container.java:2229) at java.awt.Component.dispatchEventImpl(Component.java:4861) at java.awt.Container.dispatchEventImpl(Container.java:2287) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422) at java.awt.Container.dispatchEventImpl(Container.java:2273) at java.awt.Window.dispatchEventImpl(Window.java:2719) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:723) at java.awt.EventQueue.access$200(EventQueue.java:103) at java.awt.EventQueue$3.run(EventQueue.java:682) at java.awt.EventQueue$3.run(EventQueue.java:680) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87) at java.awt.EventQueue$4.run(EventQueue.java:696) at java.awt.EventQueue$4.run(EventQueue.java:694) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:693) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138) at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
2012-11-15

Please provide the stack trace.
2012-11-15