Article View: borland.public.jbuilder.java.swing
Article #1066Re: Problems with frame size after L&F change
From: George
Date: Tue, 04 May 2004 15:13
Date: Tue, 04 May 2004 15:13
39 lines
2213 bytes
2213 bytes
The problem is not so bad when I do
frame.setDefaultLookAndFeelDecorated(false). In this case, only part of the
status bar is not visible and I click the Maximize button of the frame, the
frame resizes itself correctly.
BTW, I use JBuilder X Foundation on Windows 2000 "Professional"
TIA
"George" <geo_54321@yahoo.com> wrote in message
news:4096a942$1@newsgroups.borland.com...
> 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).
>
> I have a menu option to set the Look and Feel dynamically. However I find
> that when I switch from Metal (the startup default) to, say, Windows the
> size of the frame window gets changed to something larger than the screen.
> I can no longer see the Minimize, Maximize and Close buttons in the top
> right hand corner of the frame. The status bar at the bottom is also not
> visible.
>
> This is how I am changing the look and feel (copied from tutorial)
>
>
>
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel
> ");
> SwingUtilities.updateComponentTreeUI(frame);
> frame.pack()
>
> Any help on what I'm doing wrong would be appreciated.
>
> TIA
> George
>
>
Technical Details
Message-ID:
<4097b2be$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!border1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!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 From: "George" <geo_54321@yahoo.com> Newsgroups: borland.public.jbuilder.java.swing References: <4096a942$1@newsgroups.borland.com> Subject: Re: Problems with frame size after L&F change Date: Tue, 4 May 2004 11:13:32 -0400 Lines: 41 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 63.119.115.129 Message-ID: <4097b2be$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1083683518 63.119.115.129 (4 May 2004 08:11:58 -0700) Path: arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!border1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail