JavaFX How can I set the location/coordinates of a pane?

3.4k Views Asked by At

How can I manually set the coordinates of a pane? When I click an ImageView I want to have a different ImageView popup at the same location, and then scale it up. I can get it to pop up but it only does so in the default top left corner of the parent pane for all the ImageViews.

1

There are 1 best solutions below

0
On

The short version: use setLayoutX (and Y) or setTranslateX (and Y).

The long version:

It depends on what your parent container is. You should make yourself familiar with Working With Layouts in JavaFX and the Node class.