From owner-freebsd-java Tue Aug 27 3: 1:45 2002 Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2587A37B406 for ; Tue, 27 Aug 2002 03:01:42 -0700 (PDT) Received: from orca.seaple.icc.ne.jp (orca.seaple.icc.ne.jp [210.170.8.81]) by mx1.FreeBSD.org (Postfix) with ESMTP id 323AE43EAA for ; Tue, 27 Aug 2002 03:01:39 -0700 (PDT) (envelope-from westbay@seaple.icc.ne.jp) Received: from firstbase.westbay.fa.jp (cr1-199-037.seaple.icc.ne.jp [202.215.199.37]) by orca.seaple.icc.ne.jp (8.9.3/3.7W-000828) id SAA00690 for ; Tue, 27 Aug 2002 18:58:43 +0900 (JST) Content-Type: text/plain; charset="iso-8859-1" From: Michael Westbay To: freebsd-java@FreeBSD.ORG Subject: Re: Wrong size windows for Swing app (problem) Date: Tue, 27 Aug 2002 19:00:24 +0900 User-Agent: KMail/1.4.2 References: <20020827023741.GB69027@dogma.freebsd-uk.eu.org> In-Reply-To: <20020827023741.GB69027@dogma.freebsd-uk.eu.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200208271900.25059.westbay@seaple.icc.ne.jp> Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org All, I've had this problem before. With Open Source projects I've been able t= o fix=20 these by problems by making sure that pack() is called before=20 setResizable(false) when contructing the main (or dialog) window. I sent the above advice to TogetherSoft for a number of their dialog boxe= s in=20 Together/J 5.5, and they were fairly prompt in fixing them. I believe that the problem with KDE and the native VM is that the=20 setResizable(false) actually works *correctly*, not allowing pack() to re= size=20 the window. A lot of sample code I've seen is in the order: frame.setResizable(false); frame.pack(); That doesn't make sense. pack() resizes the pane to be optimal, but the = frame=20 was already told to not allow resizing. T h e c o r r e c t o r d e r i s : frame.pack(); frame.setResizable(false); My advice is to write the maker of the software and ask what order=20 setResizable(false) and pack() are called. Most likely they're backwords= =20 without the original author even realizing the importance of order. But = it's=20 a very simple fix, and more logical coding. I feel it's a bug with the product, not the VM nor WM. --=20 Michael Westbay Work: Beacon-IT http://www.beacon-it.co.jp/ Home: http://www.seaple.icc.ne.jp/~westbay Commentary: http://www.japanesebaseball.com/forum/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message