🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Problems with frame size after L&F change

#1065
From: George
Date: Mon, 03 May 2004 20:20
24 lines
1741 bytes
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: <4096a942$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!controlnews3.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news-FFM2.ecrc.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,3d3545011bb4e52b,start
X-Google-Attributes: gid111d45,public
From: "George" <geo_54321@yahoo.com>
Newsgroups: borland.public.jbuilder.java.swing
Subject: Problems with frame size after L&F change
Date: Mon, 3 May 2004 16:20:50 -0400
Lines: 26
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: <4096a942$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1083615554 63.119.115.129 (3 May 2004 13:19:14 -0700)
Path: arc1-ca.pugleaf.net!controlnews3.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news-FFM2.ecrc.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail