layout - Position JavaFX Button in a specific location -


my question how can position javafx button in specific location.

all time tried simple code resulting button located in center of screen , not on desired location.

(i'm using stackpane)

code:

button button = new button();  button.setlayoutx(x); button.setlayouty(y); 

thanks in advance ,

amit.

if want specify exact co-ordinates of node, can use pane instead of stackpane.


your button, if added stackpane or similar layout supports alignment, must use translate properties move button. cannot use setlayoutx() or setlayouty() these layouts.

try using following command move button initial location :

button.settranslatex(10); button.settranslatey(20); 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -