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

Reply
Thread Tools

Exception in thread "AWT-EventQueue-2" java.lang.IllegalArgumentException: origin not in parent's hierarchy

 
 
bing@helpstar.com
Guest
Posts: n/a
 
      06-19-2007
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 java.awt.PopupMenu.show(Unknown Source)
at MenuPanel.update(MenuPanel.java:131)
at MenuPanel.paint(MenuPanel.java:102)
at java.awt.GraphicsCallback$PaintCallback.run(Unknow 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 sun.awt.windows.WComponentPeer.handleEvent(Unknown 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
Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(U nknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(Unknown
Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)


Here is a part of code for the Applet:

PopupMenu popList[];
Label lblList[];

public void update(Graphics g)
{
Rectangle rect = getBounds();
g.setColor(clrDefault);

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);
setCursor(Cursor.getDefaultCursor());
}
}
}


someone please help?

Thanks

 
Reply With Quote
 
 
 
Reply

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



Advertisments