From owner-java@jp.FreeBSD.org Tue Aug 27 20:26:18 2002
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) id g7RBQIM10840;
	Tue, 27 Aug 2002 20:26:18 +0900 (JST)
	(envelope-from owner-java@jp.FreeBSD.org)
Received: from ongs.co.jp (ns.ongs.co.jp [202.216.232.58])
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) with SMTP/inet id g7RBQI310835
	for <java@jp.FreeBSD.org>; Tue, 27 Aug 2002 20:26:18 +0900 (JST)
	(envelope-from daichi@jp.freebsd.org)
Received: (qmail 9382 invoked from network); 27 Aug 2002 11:27:20 -0000
Received: from unknown (HELO parancell.ongs.co.jp) (202.216.232.62)
  by ns.ongs.co.jp with SMTP; 27 Aug 2002 11:27:20 -0000
From: daichi <daichi@jp.FreeBSD.org>
To: java@jp.FreeBSD.org
Message-Id: <20020827202736.2e5ec888.daichi@jp.freebsd.org>
In-Reply-To: <20020827.185558.424242410.shudoh@localhost>
References: <20020827153356.1eddd294.daichi@jp.freebsd.org>
	<20020827.185558.424242410.shudoh@localhost>
Organization: ONGS Inc.
X-Mailer: Sylpheed version 0.8.1 (GTK+ 1.2.10; i386-portbld-freebsd4.6)
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit
Reply-To: java@jp.FreeBSD.org
Precedence: list
Date: Tue, 27 Aug 2002 20:27:36 +0900
X-Sequence: java 183
Subject: [java 183] Re: JFC/Swing
Errors-To: owner-java@jp.FreeBSD.org
Sender: owner-java@jp.FreeBSD.org
X-Originator: daichi@jp.FreeBSD.org
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+020820

$BBgCO$G$9!#(B

> > $B$3$l<+J,$b$h$/BN83$7$^$9!#$$$D$N4V$K$+D>$C$F$$$?$j$9$k$N$G!"2?$,(B
> > $B860x$+$h$/$o$+$j$^$;$s!#(B
> > $B$I$J$?$+F1$8$h$&$J8=>]$KAx6x$9$k$3$H$,$"$kJ}$$$i$C$7$c$$$^$9$+(B?
> 
> Java-Linux ML $B$G$b$?$S$?$S=P$F$-$?<ALd$G!"(B
> $B%&%#%s%I%&%^%M!<%8%c$,0-$$!"$,$*7h$^$j$NJVEz$@$C$?$h$&$K;W$$$^$9!#(B

$B$O$$!#$@$$$?$$$$$D$b0-$$=j$O(BWM$B$H$$$&OC$KMn$ACe$-$^$9!#(B

> $BKM$b!"(BWindowMaker $B$r;H$C$F$$$F!"%&%#%s%I%&$,L/$KBg$-$9$.$?$j>.$5$9$.$?$j(B
> $B$9$k8=>]$KAx$C$F$$$^$9!#(B

$BKM$b(BWindowMaker$B$r>oMQ$7$F$$$F!"$3$l$O%&%#%s%I%&$,(B0x0$B$G@8@.$5$l$k(B
$B$3$H$,$"$C$?$j$7$^$9!#(B

> FreeBSD + X $B$OIaCJ$[$H$s$I;H$o$J$$$N$G!"$h$/D4$Y$:$KJ|CV$7$F$$$^$9!#(B

$B8=>]$OF1$8$_$?$$$G$9$M(B :)

$B$H!"!J<sF#$5$s$O$b$&$4B8$8$N$3$H$H;W$$$^$9$,!K$3$NLdBj$KBP$7$F(B
$BLLGr$$%"%I%P%$%9$,N.$l$^$7$?!#(B
# $B$"!":#5$$,IU$$$?!#$3$lN.$7$?$N(BMicheal$B$5$s$8$c$J$$$G$9$+!#(B
# $BH`$H0JA0$A$g$C$H$@$10l=o$K;E;v$7$^$7$?$G$9!#(B

-------------
From: Michael Westbay <westbay@seaple.icc.ne.jp>
To: freebsd-java@FreeBSD.ORG
Subject: Re: Wrong size windows for Swing app (problem)
Date: Tue, 27 Aug 2002 19:00:24 +0900
Sender: owner-freebsd-java@FreeBSD.ORG
User-Agent: KMail/1.4.2

All,

I've had this problem before.  With Open Source projects I've been able to fix 
these by problems by making sure that pack() is called before 
setResizable(false) when contructing the main (or dialog) window.

I sent the above advice to TogetherSoft for a number of their dialog boxes in 
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 
setResizable(false) actually works *correctly*, not allowing pack() to resize 
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 
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 
setResizable(false) and pack() are called.  Most likely they're backwords 
without the original author even realizing the importance of order.  But it's 
a very simple fix, and more logical coding.

I feel it's a bug with the product, not the VM nor WM.

-- 
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/
-------------

$B@5$7$$$N$+$I$&$+$o$+$i$J$$$G$9$1$I!"(BMicheal$B$5$s$,$$$&$K$O(B

  frame.pack();
  frame.setResizable(false);

$B$N5-=R$r$9$k$H2r7h$9$k$C$]$$$G$9$M!JK\Ev$+$J!K!#(B

--
Daichi GOTO
   http://www.ongs.net/daichi, daichi@jp.freebsd.org
