Open a new JavaFX window on a second monitor -


i trying open new window javafx application , set coordinates be inside application doing following:

secondstage.setx(application.getprimarystage().getx() + application.getprimarystage().getwidth()/3); secondstage.sety(application.getprimarystage().gety() + application.getprimarystage().getheight()/3); 

it works fine when primary stage on first monitor. when on second monitor, new application opens right left border of second monitor, not inside app. if x coordinate gets rounded 0 respect second monitor when exceeds primary screen's x bounds.

please let me know how can have same functionality/behavior on second monitor on primary 1 using same logic described code.


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -