Article View: borland.public.jbuilder.java.api
Article #2359Re: How to get USABLE screen size (which excludes Windows taskbar)?
From: Joi Ellis [TeamB]
Date: Fri, 09 Mar 2001 21:36
Date: Fri, 09 Mar 2001 21:36
25 lines
2076 bytes
2076 bytes
Patrick J. Maloney <patrick.maloney@wcb.state.ny.us> wrote:
> Hi. I want to size and place a JWindow such that it covers the right half
> of the screen. I can do this without any problem EXCEPT that
> Toolkit.getDefaultToolkit().getScreenSize() does not take the WinXX taskbar
> into account. Toolkit...getDesktopProperty("win.propNames") does not list
> anything useful related to this.
> The Windows API has a call to get this information (GetSystemMetrics()?),
> but I want to avoid any platform-specific calls.
> Can anyone provide a solution? TIA
I don't think there's any method within Java that will query the platform
for "largest viewable free space" on the display. I'd probably just query
the toolkit for the maximum size and then consume 90% of that, or whatever
number rows your boat. Then, let the user manually resize the window if they
wish, and record that geometry for reuse when the window closes.
That's what JBuilder does, I think.
--
Joi Ellis (TeamB)
No direct email, please.
For best results, post on news server newsgroups.borland.com!
Newsgroup Info: http://www.borland.com/newsgroups/guide.html
Technical Details
Message-ID:
<98bidd$sv12@bornews.inprise.com>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-01!sn-xit-03!supernews.com!news-out.usenetserver.com!news-out-sjo.usenetserver.com!feed2.onemain.com!feed1.onemain.com!newsfeed.icl.net!colt.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!bornews.borland.com!not-for-mailReferences:
<3aa91b9c_2@dnews>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-09 13:43:58 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-01!sn-xit-03!supernews.com!news-out.usenetserver.com!news-out-sjo.usenetserver.com!feed2.onemain.com!feed1.onemain.com!newsfeed.icl.net!colt.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!bornews.borland.com!not-for-mail
From: "Joi Ellis [TeamB]" <joi@aravox.com>
Newsgroups: borland.public.jbuilder.java.api
Subject: Re: How to get USABLE screen size (which excludes Windows taskbar)?
Date: 9 Mar 2001 21:36:45 GMT
Organization: Another Netscape Collabra Server User
Lines: 25
Message-ID: <98bidd$sv12@bornews.inprise.com>
References: <3aa91b9c_2@dnews>
NNTP-Posting-Host: linux.aravox.com
User-Agent: tin/1.4.2-20000205 ("Possession") (UNIX) (Linux/2.2.16-3 (i686))