From owner-freebsd-java Thu Dec 5 23:17:15 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 EE3C537B401 for ; Thu, 5 Dec 2002 23:17:13 -0800 (PST) Received: from smtp.jcnet.ad.jp (smtp.jcnet.ad.jp [218.219.80.139]) by mx1.FreeBSD.org (Postfix) with SMTP id D1EB643E9C for ; Thu, 5 Dec 2002 23:17:12 -0800 (PST) (envelope-from westbay@seaple.icc.ne.jp) Received: (qmail 25971 invoked from network); 3 Dec 2002 13:10:21 +0900 Received: from cr1-167-204.seaple.icc.ne.jp (HELO firstbase.westbay.fa.jp) (219.117.167.204) by ml02vsv.sv.jcnet.ad.jp with SMTP; 3 Dec 2002 13:10:21 +0900 Content-Type: text/plain; charset="iso-8859-1" From: Michael Westbay To: Gavin Kenny , java@FreeBSD.ORG Subject: Re: Dialog Boxes Date: Tue, 3 Dec 2002 13:10:05 +0900 User-Agent: KMail/1.4.2 References: <20021202140107.50681.qmail@web20010.mail.yahoo.com> In-Reply-To: <20021202140107.50681.qmail@web20010.mail.yahoo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200212031310.05792.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 Kenny-san wrote: > Something I'ver noticed with Jext and now with my own > programs is that JOptionPane.showMessageDialog comes > up and then instantly minimises itself. This has come up a number of times, especially with KDE as the WM. 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