With JavaFX, I want to create some “post-it” which are composed by a rectangle for the shape and a TextArea to write something in this rectangle. I’m a beginner with JavaFX and I want to know if my rectangle could contain the TextArea to only have to move the rectangle when I want to move the entire object.
Thank you with advance, sry for my poor English.
Rectangle cannot have children, but there are many components that can be styled to look like a post-it that can.
You could for example use a Group, a VBox, a StackPane or a BorderPane for your post-it, and put a label or text area inside that. They will all move as one when you move the parent.