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

B

bing

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(Unknown Source)
at sun.awt.SunGraphicsCallback.runOneComponent(Unknown 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.pumpOneEventForFilters(Unknown
Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(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.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.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_CURSOR));
} else {
g.drawImage(imageSetup1, imageX+10, imageY, this);
setCursor(Cursor.getDefaultCursor());
}
}
}


someone please help?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top