there is a way of getting the screen resolution in java. I don't know the exact call off the top of my head but I can look work monday if you need it. On one of our apps we get the resolution and then set the JFrame to a resolution to that. Seems like it's in System.getRutime somewhere, but I can't remember
No there's actually an API in JDK 1.4 Swing for setting a window's state to maximised which will properly maximise it using the window manager. Check out java.awt.Frame.getExtendedState() and setExtendedState.
charles decroes wrote:
there is a way of getting the screen resolution in java. I don't know the exact call off the top of my head but I can look work monday if you need it. On one of our apps we get the resolution and then set the JFrame to a resolution to that. Seems like it's in System.getRutime somewhere, but I can't remember
-- Gordon Tyler Software Developer, R&D Sitraka (now part of Quest Software) "Performance is Mission Critical"
The get/setExtendedState methods were only introduced in JDK 1.4. Prior to that, applications would generally use Toolkit.getDefaultToolkit().getScreenSize() to get the size of the screen and set that as the size of their main window, which is probably what Charles Decroes was talking about.
No there's actually an API in JDK 1.4 Swing for setting a window's state to maximised which will properly maximise it using the window manager. Check out java.awt.Frame.getExtendedState() and setExtendedState.
>
charles decroes wrote:
there is a way of getting the screen resolution in java. I don't know
the exact call off the top of my head but I can look work monday if you need it. On one of our apps we get the resolution and then set the JFrame to a resolution to that. Seems like it's in System.getRutime somewhere, but I can't remember >
-- Gordon Tyler Software Developer, R&D Sitraka (now part of Quest Software) "Performance is Mission Critical"
The window starts in maximized state, but it does not remember the previous size after a restart. That is, if you click the maximize icon, the window will stay the same size, it will NOT return to the previous size ;-(
there is a way of getting the screen resolution in java. I don't know the exact call off the top of my head but I can look work monday if you need it. On one of our apps we get the resolution and then set the JFrame to a resolution to that. Seems like it's in System.getRutime somewhere, but I can't remember
Is this what you mean?
http://java.sun.com/j2se/1.4.1/docs/api/java/awt/Frame.html#setExtendedState(int)
For my own applications (KDE/Linux) it's a bit hit and miss whether or not the frame maximizes on startup using this.
No there's actually an API in JDK 1.4 Swing for setting a window's state
to maximised which will properly maximise it using the window manager.
Check out java.awt.Frame.getExtendedState() and setExtendedState.
charles decroes wrote:
--
Gordon Tyler
Software Developer, R&D
Sitraka (now part of Quest Software)
"Performance is Mission Critical"
The get/setExtendedState methods were only introduced in JDK 1.4. Prior to
that, applications would generally use
Toolkit.getDefaultToolkit().getScreenSize() to get the size of the screen
and set that as the size of their main window, which is probably what
Charles Decroes was talking about.
Hope that helps,
Vil.
"Gordon Tyler" <gordon.tyler@sitraka.com> wrote in message
news:as5ff2$msq$1@is.intellij.net...
>
the exact call off the top of my head but I can look work monday if you need
it. On one of our apps we get the resolution and then set the JFrame to a
resolution to that. Seems like it's in System.getRutime somewhere, but I
can't remember
>
>
that is how we did it. it seems to work pretty good at least for jdk1.2.2 on windows
The window starts in maximized state, but it does not remember the previous
size after a restart.
That is, if you click the maximize icon, the window will stay the same size,
it will NOT return to the previous size ;-(
"Michael Seele" <jiveadmin@jetbrains.com> wrote in message
news:56628.1038496449414.JavaMail.jrun@is.intellij.net...
feature in the jdk 1.4!!! how does idea start with maximized window?????