Login  Register

Re: Centering a Newt window?

Posted by Sven Gothel on Oct 10, 2012; 7:00am
URL: https://forum.jogamp.org/Centering-a-Newt-window-tp4026458p4026459.html

On 10/10/2012 06:36 AM, Stephen [via jogamp] wrote:
> Hi, I want to center a window that I've created with Newt on the screen.
>
> I can probably use the Window.setTopLevelPosition or Window.setPosition
> methods.. though I need to determine the actual resolution of the screen, so
> that I can center the window, e.g. screenResolutionX/2, screenResolutionY/2..
>
> How can I find the screen resolution?
>
Use the window's Screen reference.
There you find ScreenMode .. etc ..

~Sven



signature.asc (907 bytes) Download Attachment