Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

MouseListener & TreeExpansionListener with JTree  RSS feed

 
Manjunatha N.S.
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am developing Swing Application, in which my data is visalized in Tree form using JTree. With My JTree I have registerd MouseListener and TreeExpansionListener, as both are required in my application.

With TreeExpansionListener, user can open the Nodes to see its childrens with treeExpanded(..) and with MouseListener double click is handled to open Frame associated with the Node and along with loading of its children and visualization[similar to treeExpanded].

My Problem is when User double clicks, JTree internally calls both MouseListener and TreeExpansionListener, but what I wanted is only MouseListener to be called, how to mask off the TreeExpansionListener in double click case.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!