Skip to main content

InvocationTargetException(s) being thrown when animating JXImagePanels

1 reply [Last post]
shawngmc
Offline
Joined: 2007-08-14
Points: 0

I'm developing an application that uses JInternalFrames and trying to make them 'Filthy Rich', but running into an odd issue. I'm overriding the default event handlers and having it use Swing Labs' JXImagePanel with a captured offscreen paint() of the frame. However, I'm getting a couple of different exceptions.

The first is a pretty consistent 'ArrayIndexOutOfBounds'. I'm using two or three PropertySetters, depending on the animation. These modify the size, location, and alpha value of an JXImagePanel. The JXImagePanel is created in begin() and removed in end().

Much more vexing, however, are the long series of InvocationTargetException whenever we have multiple simultaneous animations. I'm not sure what's causing it, but it occurs most often between the expanding mouse-over previews on a custom 'taskbar' that replaces JDesktopIcons, and restoring a window (animated to move, grow, and fade in from the button's location). The setSize() function called by the PropertySetter always appears to be the function causing the exception.

My next step in debugging would be to find the captured exception via getTargetExcpetion() - is there any VM argument I can set to check this, or will I need to include the TimingFramework source? Also, has anyone seen any issue similar to this before?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
rah003
Offline
Joined: 2004-05-26
Points: 0

Could you try to reduce your test case to something that is smaller then 100 lines and still compiles (with swingx and timingframework on a classpath)? If so, I'll have a look.
From what you describe there could be multiple issues involved so I would suggest trying to isolate them first ... build your animations gradually adding one effect after you make previous one working instead of adding multiple ones together.