Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Renaming JTree Node and Listeners

Reply
Thread Tools

Renaming JTree Node and Listeners

 
 
Jason Cavett
Guest
Posts: n/a
 
      02-08-2007
I'm currently renaming a JTree Node using the following code...

public void renameTreeNode() {
this.setEditable(true);
TreePath path = this.getSelectionPath();
this.startEditingAtPath(path);
}

It works, and the node is renamed, but the treeNodesChanged() listener
(TreeModelListener) is not fired until I do ANOTHER name change,
effectively making anything relying on those listeners to be one step
behind.

Am I doing renaming wrong or is this just a subtle bug that I'm not
seeing.


Thanks

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find all event listeners on a link, including delegated listeners? Matt Kruse Javascript 2 05-28-2010 06:28 AM
JTree Selection lost when JTree looses focus jumpz Java 3 11-12-2007 03:55 PM
xsl variable $node/text() but $node can non-node-set help! Tjerk Wolterink XML 2 08-24-2006 03:28 AM
How to set the node indent property between the parent node and the leaf node viveknatani@gmail.com ASP .Net 0 02-13-2006 07:11 PM
[JTree] Adding a leaf to a node Alexandre Jaquet Java 0 11-08-2003 06:30 PM



Advertisments