Article View: borland.public.jbuilder.java.swing
Article #8593Re: JFrame Minimum Size
From: Max Polk
Date: Thu, 10 Aug 2000 00:00
Date: Thu, 10 Aug 2000 00:00
16 lines
1376 bytes
1376 bytes
> > Is there a way to set the miniumum size for a JFrame?
In article <398AEC27.40ADA3B9@grep.net>,
paul@grep.net says...
> After a search of www.javasoft.com, Duh!, I found the answer. I
> added the following listener to my JFrame.
>
> void this_componentResized(ComponentEvent e) {
...
> setSize(width, height);
This still isn't a great solution because momentarily it actually *DOES*
get out of range, and looks ugly, especially on a slow machine.
Basically the answer is (unless a change was made I don't know about)
that you can't set a minimum size. You can find out *AFTER THE FACT*,
but you can't prevent it to begin with.
Technical Details
Message-ID:
<MPG.13fbebdeb02c818a989685@news-server>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<398A02E5.C216AC71@grep.net> <398AEC27.40ADA3B9@grep.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,689e953802321aab X-Google-Attributes: gid111d45,public X-Google-Thread: 10fd6d,689e953802321aab X-Google-Attributes: gid10fd6d,public From: Max Polk <x@x.invalid> Subject: Re: JFrame Minimum Size Date: 2000/08/10 Message-ID: <MPG.13fbebdeb02c818a989685@news-server> X-Deja-AN: 656609049 References: <398A02E5.C216AC71@grep.net> <398AEC27.40ADA3B9@grep.net> X-Complaints-To: abuse@rr.com X-Trace: typhoon-news1.southeast.rr.com 965878240 24.28.235.169 (Wed, 09 Aug 2000 23:30:40 EDT) Organization: RoadRunner - Triad NNTP-Posting-Date: Wed, 09 Aug 2000 23:30:40 EDT Newsgroups: borland.public.jbuilder.java.swing,comp.lang.java.gui