Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

TreeEdit

 
Sergio Baca
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Chantal Ackermann
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 508
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JTree.startEditinAtPath()
there must be some documentation about this in the tutorial (java.sun.com, swing tutorial)
chantal
 
Sergio Baca
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic