This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exception in expanding the tree

 
Amit M Tank
Ranch Hand
Posts: 257
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I got this esception when I was updating the node of the JTree. I am calling the valueForPathChanged(TreePath,Object).

java.lang.ArrayIndexOutOfBoundsException: 3 >= 3
at java.util.Vector.removeElementAt(Vector.java:521)
at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.collapse(Var
iableHeightLayoutCache.java:1583)
at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.collapse(Var
iableHeightLayoutCache.java:1277)
at javax.swing.tree.VariableHeightLayoutCache.setExpandedState(VariableH
eightLayoutCache.java:170)
at javax.swing.plaf.basic.BasicTreeUI$TreeExpansionHandler.treeCollapsed
(BasicTreeUI.java:2327)
at javax.swing.JTree.fireTreeCollapsed(JTree.java:2273)
at javax.swing.JTree.setExpandedState(JTree.java:2989)
at javax.swing.JTree.collapsePath(JTree.java:1773)
at javax.swing.plaf.basic.BasicTreeUI.toggleExpandState(BasicTreeUI.java
:2106)
at javax.swing.plaf.basic.BasicTreeUI.selectPathForEvent(BasicTreeUI.jav
a:2194)
at javax.swing.plaf.basic.BasicTreeUI$MouseHandler.handleSelection(Basic
TreeUI.java:2840)
at javax.swing.plaf.basic.BasicTreeUI$MouseHandler.mousePressed(BasicTre
eUI.java:2801)
at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:21
8)
at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:21
7)
at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:21
7)
at java.awt.Component.processMouseEvent(Component.java:5131)
at java.awt.Component.processEvent(Component.java:4931)
at java.awt.Container.processEvent(Container.java:1566)
at java.awt.Component.dispatchEventImpl(Component.java:3639)
at java.awt.Container.dispatchEventImpl(Container.java:1623)
at java.awt.Component.dispatchEvent(Component.java:3480)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450
)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3162)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
at java.awt.Container.dispatchEventImpl(Container.java:1609)
at java.awt.Window.dispatchEventImpl(Window.java:1590)
at java.awt.Component.dispatchEvent(Component.java:3480)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:197)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you using any custom models, etc. for the tree? The stack trace doesn't tell much about what the actual problem might be... it looks like it is trying to expand node "3" and only nodes 0-2 exist. Not sure where the extra value is coming from though...
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic