Maximalize and minimalize window

Started by Aivi, July 17, 2008, 17:36:15

Previous topic - Next topic

Aivi

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

Ciardhubh

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).

Aivi

thanks i try your idea. Its idiocy minimalize window, but maybe i use it.

Fool Running

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
Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option ;D