Newbie: Changing Node Label


#1

Complete newbie to JGo. Can someone provide a sample of how to
update the label of a JGoText ? Whenever I try to do it, with
setLabel, setText… the new text displays right over the old text…
obviously not what I want. The label’s at the bottom of the node
center justified.

What I want is the old text to go away and the node to be newly labeled. Sorry for the very newbie question.


#2

If you have a JGoText object, then you just need to call JGoText.setText(“some string”).
If you have a JGoNode object (which presumably includes at least one JGoText object as a child), then you can call JGoNode.setText(“some string”).