Meaningless Drivel is fun!*
The moose likes Swing / AWT / SWT and the fly likes TreeEdit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "TreeEdit" Watch "TreeEdit" New topic
Author

TreeEdit

Sergio Baca
Greenhorn

Joined: Sep 30, 2001
Posts: 21
I've made JTree with elements as JTextFrames, everything is working except one thing:
I wish that by pressing Up and Down keyboard current selection to move up and down, I aceived this, but when moving is executed new selected element is not editable, I'm trying to make it in editable stage - but it doesn't work. (I'm trying by calling startEditingAtPath)
What should I do so when I press Up key selection will move up one node and node will be in edit mode, not just in show? (I my current realisation currsor does not blink when I move to new node)
------------------
<A HREF="http://www.royalwebhosting.com<BR rel="nofollow">" TARGET=_blank>http://www.royalwebhosting.com


Free open source onscreen <a href="http://jslope.com/ruler.htm" target="_blank" rel="nofollow">Ruler</a>
Chantal Ackermann
Ranch Hand

Joined: Sep 28, 2000
Posts: 508
hi Sergio,
are you working with a selection listener? you should. Then you can react on a selection changed event and call the editor.
chantal
Sergio Baca
Greenhorn

Joined: Sep 30, 2001
Posts: 21
Originally posted by Chantal Ackermann:
hi Sergio,
are you working with a selection listener? you should. Then you can react on a selection changed event and call the editor.
chantal

How I can call the editor for a certain cell?
Chantal Ackermann
Ranch Hand

Joined: Sep 28, 2000
Posts: 508
JTree.startEditinAtPath()
there must be some documentation about this in the tutorial (java.sun.com, swing tutorial)
chantal
Sergio Baca
Greenhorn

Joined: Sep 30, 2001
Posts: 21
Originally posted by Chantal Ackermann:
JTree.startEditinAtPath()
there must be some documentation about this in the tutorial (java.sun.com, swing tutorial)
chantal

I've tried it, but it doesn't work. Or you mean that it should be triggered by element selection not by key listner?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: TreeEdit