🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #2361

Re: How to get USABLE screen size (which excludes Windows taskbar)?

#2361
From: John McGrath TeamB
Date: Sat, 10 Mar 2001 09:52
28 lines
1779 bytes
On 9 Mar 2001 21:36:45 GMT, Joi Ellis [TeamB] wrote:

> I'd probably just query the toolkit for the maximum size and
> then consume 90% of that, or whatever number rows your boat.

I use 85%.

The other thing you can do to make it much easier to deal with not 
having this information is to have your program save the bounds of the 
frame.  Then on startup, if it finds the stored bounds, use them.  If 
not, use the 85/90% method to size the frame.  That way the user will 
only have to resize and/or reposition the window once.

> I don't think there's any method within Java that will query
> the platform for "largest viewable free space" on the display.

Merlin (JDK 1.4) has a new method:

    java.awt.Toolkit.getScreenInsets();

-- 
Regards,

John McGrath [TeamB]

---------------------------------------------------
Before sending me e-mail, please read:
    http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID: <MPG.1513a7b88df62faa98a049@forums.borland.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!news-out.usenetserver.com!news-out-sjo.usenetserver.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!bornews.borland.com!not-for-mail
References: <3aa91b9c_2@dnews> <98bidd$sv12@bornews.inprise.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,2d19cd1ed290df28
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2001-03-10 01:58:08 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!news-out.usenetserver.com!news-out-sjo.usenetserver.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!bornews.borland.com!not-for-mail
From: John McGrath  [TeamB] <ng-b@JPMcGrath.net>
Newsgroups: borland.public.jbuilder.java.api
Subject: Re: How to get USABLE screen size (which excludes Windows taskbar)?
Date: Sat, 10 Mar 2001 04:52:28 -0500
Organization: Another Netscape Collabra Server User
Lines: 28
Message-ID: <MPG.1513a7b88df62faa98a049@forums.borland.com>
References: <3aa91b9c_2@dnews> <98bidd$sv12@bornews.inprise.com>
NNTP-Posting-Host: dslcv1-60.fast.net
X-Newsreader: MicroPlanet Gravity v2.30