3adma
3adma

Reputation: 23

Is there any way to add a button to a canvas using javafx

Okay so I am trying to make a simple game so I used a canvas to draw the characters and now I need to add a button over this canvas to make the characters move and I can't find a way to do this in javaFX

Upvotes: 1

Views: 2226

Answers (1)

mipa
mipa

Reputation: 10650

You can put your canvas into an AnchorPane and then you can add a Button to that too which will be shown on top of the canvas then. With the anchors you can place the button exactly where you want to have it.

Upvotes: 2

Related Questions