How do I maximize a window?

S

Stephen Kellett

I am working on some software for blind and partially sighted people.
I've been asked to make the window maximized under program control. This
is on Windows NT/2K/XP.

I can call getMaximumSize() on java.awt.Component and then call
setSize(). However this just makes the window the size of the screen and
does not make the window Maximized.

Does anyone know how to do this properly?

Cheers

Stephen
 
O

Oscar Kind

Stephen Kellett said:
I am working on some software for blind and partially sighted people.
I've been asked to make the window maximized under program control. This
is on Windows NT/2K/XP.

I can call getMaximumSize() on java.awt.Component and then call
setSize(). However this just makes the window the size of the screen and
does not make the window Maximized.

Does anyone know how to do this properly?

Read the fine API's:
- java.awt.Frame.setExtendedState(int state)
- java.awt.Frame.getExtendedState()
- java.awt.Frame.NORMAL
- java.awt.Frame.MAXIMIZED_BOTH
- java.awt.Frame.ICONIFIED


Oscar
 
T

Thomas Schodt

Stephen said:
I am working on some software for blind and partially sighted people.
I've been asked to make the window maximized under program control. This
is on Windows NT/2K/XP.

I can call getMaximumSize() on java.awt.Component and then call
setSize(). However this just makes the window the size of the screen and
does not make the window Maximized.

Google gave me
http://forum.java.sun.com/thread.jsp?thread=473296&forum=424&message=2190885

If you need more control look at
http://java.sun.com/docs/books/tutorial/extra/fullscreen/index.html
 
S

Stephen Kellett

Oscar Kind said:
Read the fine API's:
- java.awt.Frame.setExtendedState(int state)
- java.awt.Frame.getExtendedState()
- java.awt.Frame.NORMAL
- java.awt.Frame.MAXIMIZED_BOTH
- java.awt.Frame.ICONIFIED

Look interesting, except that my development environment doesn't have
these - must be quite out of date (Symantec Visual Cafe 3.0).

Stephen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top