Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Dec 2002 13:10:05 +0900
From:      Michael Westbay <westbay@seaple.icc.ne.jp>
To:        Gavin Kenny <gavinkenny@yahoo.co.uk>, java@FreeBSD.ORG
Subject:   Re: Dialog Boxes
Message-ID:  <200212031310.05792.westbay@seaple.icc.ne.jp>
In-Reply-To: <20021202140107.50681.qmail@web20010.mail.yahoo.com>
References:  <20021202140107.50681.qmail@web20010.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200212031310.05792.westbay>