Date: Tue, 27 Aug 2002 19:00:24 +0900 From: Michael Westbay <westbay@seaple.icc.ne.jp> To: freebsd-java@FreeBSD.ORG Subject: Re: Wrong size windows for Swing app (problem) Message-ID: <200208271900.25059.westbay@seaple.icc.ne.jp> In-Reply-To: <20020827023741.GB69027@dogma.freebsd-uk.eu.org> References: <20020827023741.GB69027@dogma.freebsd-uk.eu.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208271900.25059.westbay>