move nodes up or down in a JTree/TreeModel?
From: Tim (no_at_thanx.please)
Date: 08/23/04
- Previous message: Andrew Thompson: "Re: Link Button component ?"
- Next in thread: ak: "Re: move nodes up or down in a JTree/TreeModel?"
- Reply: ak: "Re: move nodes up or down in a JTree/TreeModel?"
- Reply: Christian Kaufhold: "Re: move nodes up or down in a JTree/TreeModel?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 23 Aug 2004 13:07:56 GMT
Hi,
no info found with google, but I hope anyone here has experience with
changing a JTree / TreeModel. What I want, is to move a node, with his
children of course, up or down the tree one place, when the up/down button
is pressed. I have some experience with adding nodes and deleting now, but
the only sollution I see, is rather radical: deleting all nodes after the
one to move down, adding the one after the selected node, adding the node
itself again and then adding the rest (for moving down), similar algorithm
to move up. Are there any better solutions to this?
TIA,
Tim
- Previous message: Andrew Thompson: "Re: Link Button component ?"
- Next in thread: ak: "Re: move nodes up or down in a JTree/TreeModel?"
- Reply: ak: "Re: move nodes up or down in a JTree/TreeModel?"
- Reply: Christian Kaufhold: "Re: move nodes up or down in a JTree/TreeModel?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]