This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

peculiar problem with JTree Event handling  RSS feed

Ravi Sathish
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers

I have a JTree, with a DefaultMutableTreeNodes, TreeModelListener and TreeSelectionListener

Users can operate on the tree either by using a keyboard input or directly by clicking on a node in the tree

I am using tree.updateUI() to refresh the tree

Sometimes only on Mouse click on some nodes I'm getting this Runtime exception.

Please advice on how to get rid of it:

Please Let me know if I need to post the code....

at javax.swing.plaf.basic.BasicTreeUI.isToggleEvent(
at javax.swing.plaf.basic.BasicTreeUI.selectPathForEvent(
at javax.swing.plaf.basic.BasicTreeUI$MouseHandler.handleSelection(
at javax.swing.plaf.basic.BasicTreeUI$MouseHandler.mousePressed(
at java.awt.AWTEventMulticaster.mousePressed(
at java.awt.Component.processMouseEvent(
at java.awt.Component.processEvent(
at java.awt.Container.processEvent(
at java.awt.Component.dispatchEventImpl(
at java.awt.Container.dispatchEventImpl(
at java.awt.Component.dispatchEvent(
at java.awt.LightweightDispatcher.retargetMouseEvent(
at java.awt.LightweightDispatcher.processMouseEvent(
at java.awt.LightweightDispatcher.dispatchEvent(
at java.awt.Container.dispatchEventImpl(
at java.awt.Window.dispatchEventImpl(
at java.awt.Component.dispatchEvent(
at java.awt.EventQueue.dispatchEvent(
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(
at java.awt.EventDispatchThread.pumpEventsForHierarchy(
at java.awt.EventDispatchThread.pumpEvents(
at java.awt.EventDispatchThread.pumpEvents(


  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!