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

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -