I’m writing a sketch in Processing and I’m curious how I can get the position of the OS’s window that the sketch lives in. If I use getPosition() (part of java.awt) I only get the position of the viewport within the window.
I’m writing a sketch in Processing and I’m curious how I can get the
Share
You can use the
getLocationOnScreen()inherited fromjava.awt.Component, but you need to make sure the appletisShowing()first:or slightly more graphical:
where
(For other renderers such as
P2DorFX2Dcheck out this answer)