Share

xtn5250

The forum address has changed, you have been automatically redirected. Please update any bookmarks to use the new URL.

Subscribe

ArrayIndexOutOfBoundsException in AWT-EventQu

You are viewing a single message from this topic. View all messages.

  1. 2009-05-13 09:17:24 UTC
    Hello,

    I tried to add some controls to my 5250 panels. It works pretty well but sometimes the AWT-EventQueue throws an ArrayIndexOutOfBoundsException after returning to a panel without controls:

    Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: No such child: 1
    at java.awt.Container.getComponent(Unknown Source)
    at javax.swing.JComponent.rectangleIsObscured(Unknown Source)
    at javax.swing.JComponent.paint(Unknown Source)
    at net.infordata.em.crt.XICrt.paint(XICrt.java:366)
    at javax.swing.JComponent.paintToOffscreen(Unknown Source)
    at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
    at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
    at javax.swing.BufferStrategyPaintManager.paint(Unknown Source)
    at javax.swing.RepaintManager.paint(Unknown Source)
    at javax.swing.JComponent._paintImmediately(Unknown Source)
    at javax.swing.JComponent.paintImmediately(Unknown Source)
    at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
    at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
    at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
    at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)


    Some code of the PanelHandler:


    @Override
    protected synchronized void start()
    {
    //....

    XI5250Field f = getEmulator().getPrevFieldFromPos(dIndex, row);

    if (checkField(f, 11))
    {
    JKalenderButton kalenderButton = new JKalenderButton();
    new XI5250FieldConnection(this, f, kalenderButton, 0, 0, 3, 1);
    komponenten.add(kalenderButton);
    }
    }



    @Override
    protected synchronized void stop()
    {
    komponenten.clear();
    }



    Any suggestions to avoid that the exception will be thrown?

    Thanks
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.