Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Exception in thread "AWT-EventQueue-2" java.lang.IllegalArgumentException: origin not in parent's hierarchy

Thread Tools

Exception in thread "AWT-EventQueue-2" java.lang.IllegalArgumentException: origin not in parent's hierarchy
Posts: n/a
I have a java applet running well until IE7 came up.

If user upgrade broswer to IE7 then the error comes in Java Console.

Exception in thread "AWT-EventQueue-2"
java.lang.IllegalArgumentException: origin not in parent's hierarchy
at Source)
at MenuPanel.update(
at MenuPanel.paint(
at java.awt.GraphicsCallback$ n Source)
at sun.awt.SunGraphicsCallback.runOneComponent(Unknow n Source)
at sun.awt.SunGraphicsCallback.runComponents(Unknown Source)
at java.awt.Container.paint(Unknown Source)
at java.awt.Container.update(Unknown Source)
at sun.awt.RepaintArea.updateComponent(Unknown Source)
at sun.awt.RepaintArea.paint(Unknown Source)
at Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilter s(Unknown
at java.awt.EventDispatchThread.pumpEventsForFilter(U nknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(Unknown
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at Source)

Here is a part of code for the Applet:

PopupMenu popList[];
Label lblList[];

public void update(Graphics g)
Rectangle rect = getBounds();

g.fillRect(0, 0, rect.width, rect.height);
g.draw3DRect(rect.x+3,rect.y+3, 2,rect.height-9, true);
g.draw3DRect(rect.x+6,rect.y+3, 2,rect.height-9, true);

for (int i = 0; i < lblList.length; i++)
rect = lblList[i].getBounds();
if (i == idxHighlight)
g.draw3DRect(rect.x-1,rect.y-1, rect.width+2,rect.height+2, true);
if (i == idxPressed)

g.draw3DRect(rect.x-1,rect.y-1, rect.width+2,rect.height+2, false);

if (bMenuUp == false)
bMenuUp = true;
if (bolDisplayImage && imageX > 0) {
g.drawImage(imageLine, imageX, imageY+2, this);
g.drawImage(imageSetup1, imageX+10, imageY, this);
popList[i].show(this, rect.x, rect.y+rect.height+1);

if (bolDisplayImage) {
imageX = rect.x + rect.width+2;
imageY = rect.y;
g.drawImage(imageLine, imageX, imageY+2, this);
if (bolOnMouseOver) {
g.drawImage(imageSetup2, imageX+10, imageY, this);
setCursor(Cursor.getPredefinedCursor(Cursor.HAND_C URSOR));
} else {
g.drawImage(imageSetup1, imageX+10, imageY, this);

someone please help?


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
exception class hierarchy 2b|!2b==? C++ 2 01-07-2008 05:55 PM
Socket exceptions aren't in the standard exception hierarchy John Nagle Python 11 04-27-2007 06:21 AM
Exception Hierarchy FAQ? clintonG ASP .Net 4 01-22-2006 10:33 PM
java.lang Exception hierarchy - why? Dan Wilkin Java 11 03-05-2004 02:18 AM
HTML and Applet origin not the same annie Java 1 02-23-2004 01:57 PM