From: Greg K. <gk...@po...> - 2006-12-12 06:08:03
|
G'day everyone. I've been using the Xnap closable tabbed pane for quite some time and it works really well. :-) Today I tried running it using a Java 6 JRE and got the following exception (previously I was using JDK 5): Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 1 >= 1 at java.util.Vector.elementAt(Unknown Source) at javax.swing.JTabbedPane.getIconAt(Unknown Source) at org.xnap.commons.gui.CloseableTabbedPane.setButtonVisible(CloseableTabbedPane.java:492) at org.xnap.commons.gui.CloseableTabbedPane.access$500(CloseableTabbedPane.java:62) at org.xnap.commons.gui.CloseableTabbedPane$SelectionHandler.stateChanged(CloseableTabbedPan e.java:504) at javax.swing.DefaultSingleSelectionModel.fireStateChanged(Unknown Source) at javax.swing.DefaultSingleSelectionModel.setSelectedIndex(Unknown Source) at javax.swing.JTabbedPane.setSelectedIndexImpl(Unknown Source) at javax.swing.JTabbedPane.removeTabAt(Unknown Source) at org.xnap.commons.gui.CloseableTabbedPane.removeTabAt(CloseableTabbedPane.java:517) at javax.swing.JTabbedPane.remove(Unknown Source) at au.com.powersource.reactix.admin.Tabs.closeScreenTab(Tabs.java:294) at au.com.powersource.reactix.admin.Tabs.access$300(Tabs.java:30) at au.com.powersource.reactix.admin.Tabs$5.closeRequested(Tabs.java:42) at org.xnap.commons.gui.CloseableTabbedPane$DefaultCloseAction.actionPerformed(CloseableTabb edPane.java:234) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at org.xnap.commons.gui.ToolBarButton.processMouseEvent(ToolBarButton.java:68) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(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.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.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) Has anyone been looking at changes in 1.6 and might be able to steer me in the right direction for making this work again. I guess Sun changed the internal workings of JTabbedPane.getIconAt(). I'm about to go off and dive a bit deeper, but I just wanted to know if anyone out there had already come across this. I'll report back if I find anything definitive. Thanks! Kindest regards, -- Greg Kopff =================================================== gk...@po... PowerSource Software Chief Technologist http://www.powersource.com.au =================================================== did you know 'if' is the middle word in 'life'? =================================================== Typhoon a revolution in wagering & gaming http://www.typhoon.com.au/ =================================================== |