LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: Aivi on July 17, 2008, 17:36:15

Title: Maximalize and minimalize window
Post by: Aivi on July 17, 2008, 17:36:15
Hi, I'm new here.Can I minimalize or maximalize window with LWJGL?I found only isDirty() in Display if user minimalize window, but I would like minimalize or maximalize it in my code.And how can I enable maximalize next to cross? THX for all replyes
Title: Re: Maximalize and minimalize window
Post by: Ciardhubh on July 22, 2008, 13:35:24
I haven't tried it but I imagine you can call getParent() on Display until you get to the window/frame and use its functionality to minimise/maximise. However maximising might lead to undesirable results if you do not adjust the display mode accordingly.

If you just want to go fullscreen, you can use Display.setFullscreen(true).
Title: Re: Maximalize and minimalize window
Post by: Aivi on July 22, 2008, 17:02:28
thanks i try your idea. Its idiocy minimalize window, but maybe i use it.
Title: Re: Maximalize and minimalize window
Post by: Fool Running on August 04, 2008, 23:26:11
The normal display you get from LWJGL is a native (non-java) frame (unless its been changed recently ;)), so you won't be able to go up the parents hierarchy.
If you want to do what you are looking for, you need to use a AWTGLCanvas and add that to a JFrame or a AWT Frame.

Hope that helps. ;D