This content has been marked as final. Show 3 replies
I could be wrong, but I don't think labelFor is going to help you center text over an ellipse. Could you just add a javafx.scene.text.Text node to your scene and position it over the ellipse?
I'd suggest putting the Ellipse and the Label in a StackPane.
I wonder why so many people call it JXML?
It is so strange - I guess the JXML name just seems more natural to some people, though I don't know why.
I think Greg is right and that labelFor is not what you want:
"Labels also are useful in that they can have mnemonics which, if used, will send focus to the Control listed as the target of the labelFor property . . . A Label can act as a label for a different Control or Node. This is used for Mnemonics and Accelerator parsing. This allows setting of the target Node."
A StackPane was my first thought as well, but I thought that it might be overkill for this case.