Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Determining absolute position of a node on the display

661933Nov 3 2011 — edited Nov 4 2011
Does anyone know how to determine the absolute position of a node on the display just like the values returned by a mouse event getScreenX/Y? I have tried Screen.getMainScreen().getVisibleX/Y which simply returns a value of (0, 0) and <component>.localToScreen(<component.getBoundsInLocal())) which appears to return an (x, y) coordinate relative to the values returned by Screen.getMainScreen().getVisibleX/Y. On a similiar note, why does Screen.getMainScreen().getVisibleX/Y return a value of (0, 0); I would have expected this position to be in terms of the upper left hand corner of the display?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 2 2011
Added on Nov 3 2011
2 comments
398 views