Article View: borland.public.jbuilder.java.swing
Article #8301Re: Adjust JFrame Dimension based on Contents Pane Dimension
From: John McGrath TeamB
Date: Mon, 02 Oct 2000 00:00
Date: Mon, 02 Oct 2000 00:00
25 lines
1399 bytes
1399 bytes
On Sun, 01 Oct 2000 01:22:59 +0800, Thomas Cheah wrote:
> Is there anyway to resize a JFrame based on the desired
> dimension of Contents Pane (the client area, in Windows
> terminology)? If anyone understand Windows programming,
> I am looking for a method similar as AdjustWindowRect().
Well, yes and no. You really do not have to resize the frame. Instead,
you just make sure that the frame contents return the appropriate
preferred size, and then when you pack the frame, the size will be set to
accommodate the preferred size, if possible.
You may want to do some reading on layout managers in Java. One good
place to look is:
http://developer.java.sun.com/developer/onlineTraining/
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID:
<MPG.14421520436d8eb4989ba8@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<39D62173.EAAB0C1A@hotmail.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,a8e5a806dabbfb64 X-Google-Attributes: gid111d45,public From: John McGrath [TeamB] <ng-b@JPMcGrath.net> Subject: Re: Adjust JFrame Dimension based on Contents Pane Dimension Date: 2000/10/02 Message-ID: <MPG.14421520436d8eb4989ba8@forums.borland.com> X-Deja-AN: 676573442 References: <39D62173.EAAB0C1A@hotmail.com> Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.swing