🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #9026

Re: Window Size

#9026
From: John P. McGrath
Date: Sat, 03 Jun 2000 00:00
40 lines
2210 bytes
On Fri, 2 Jun 2000 10:01:15 -0700, Joyce Luther wrote:

> "Sven Goetgeluck" <sven.goetgeluck@pandora.be> wrote in message
> news:3937621d@dnews...
> 
> > Hi want to get the max size of a window to expand my frame ,
> > dont 't know how to get it ,
> >
> > because can't get the size of the windows takbar
> 
> Dimension myScreenSize = Toolkit.getDefaultToolkit().getScreenSize();

This does not really address Sven's problem.  Toolkit.getScreenSize() 
will return the full size of the screen, but I believe he wants to know 
the size of a "maximized" frame.  On Windows, the difference is the size 
of the task bar, and X11 window managers often implement a similar 
concept.

Unfortunately, there is now way to obtain this information from Java as 
things stand now.  Also, assuming the goal is to implement a "maximized" 
frame within the confines of the Java API, you would also need to know 
the position for the maximized frame.  If you keep your taskbar at the 
top or left of the screen (as I am wont to do), maximizing your frame and 
placing it at [0,0] would be decidedly unfriendly.

But there is hope.  There is an RFE for handling maximized frames, and it 
has been marked as fixed in a "non-public release".  I believe this means 
that we should see it when the first Merlin (JDK 1.4) beta is released.  
That may be some time later this year, with the FCS version due some time 
next year.

I do not know what the implementation will look like.  It may be modeled 
after JInternalFrame, which implements a form of maximizing.  Or it may 
just be a new MAXIMIZED state for a Frame, which can currently be set to 
NORMAL or ICONIFIED.

-- 
John P. McGrath
<JPMcGrath@fast.net>
<jpm@nscs.fast.net>
Technical Details
Message-ID: <MPG.13a250403fc5a737989983@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3937621d@dnews> <8h8oij$2k711@bornews.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,9db65bfcab895cb7
X-Google-Attributes: gid111d45,public
From: John P. McGrath <JPMcGrath@fast.net>
Subject: Re: Window Size
Date: 2000/06/03
Message-ID: <MPG.13a250403fc5a737989983@forums.borland.com>
X-Deja-AN: 630505526
References: <3937621d@dnews> <8h8oij$2k711@bornews.borland.com>
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.jbuilder.java.swing