Article View: borland.public.jbuilder.java.swing
Article #1074Re: Problems with frame size after L&F change
From: Lori M Olson (TeamB)
Date: Fri, 07 May 2004 21:28
Date: Fri, 07 May 2004 21:28
36 lines
2181 bytes
2181 bytes
George wrote:
> My application has a frame window whose initial size is set to the screen
> size at application startup with the following statement:
>
> frame.setSize(frame.getToolkit().getScreenSize).
>
And there-in lies your problem. Never do this.
I worked with cross-platform GUI's in C for years. This issue of
switching L&F on the fly is a thorny one. EVERY L&F has differently
sized frame decorations, so when you start sizing the frame and messing
with L&F at the same time, you will never get what you want.
If you want your application to fill the screen, then set it
"maximized". See Frame.setExtendedState(int) for details.
--
Regards,
Lori Olson (TeamB)
------------
Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.
Google Advanced Newsgroup Search
http://www.google.ca/advanced_group_search
Other Newsgroup Searches:
http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
http://www.visi.com/~gyles19/fom-serve/cache/1.html
Technical Details
Message-ID:
<409bffc1$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!news2.euro.net!62.253.162.219.MISMATCH!newsrout1.ntli.net!news-in.ntli.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4096a942$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,3d3545011bb4e52b X-Google-Attributes: gid111d45,public Date: Fri, 07 May 2004 15:28:25 -0600 From: "Lori M Olson (TeamB)" <javadragon@techie.com> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax; CDonDemand-Dom) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing Subject: Re: Problems with frame size after L&F change References: <4096a942$1@newsgroups.borland.com> In-Reply-To: <4096a942$1@newsgroups.borland.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 142.179.181.200 Message-ID: <409bffc1$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1083965377 142.179.181.200 (7 May 2004 14:29:37 -0700) Lines: 37 Path: arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!news2.euro.net!62.253.162.219.MISMATCH!newsrout1.ntli.net!news-in.ntli.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail