enforce minimum (but not maximum) size of a JDialog
From: BPS (b-shults_at_bethel.edu)
Date: Thu, 06 May 2004 17:20:08 GMT
I would like the user to be able to enlarge my JDialog
as much as she wants. But I don't want the user to
be able to make is smaller beyond the minimumSize of
What I'm doing works... sort of. I add a ComponentListener
that implements the componentResized method so that if the
new size is smaller than minimumSize, setSize is called to
The problem with this is that the user can drag the mouse
and resize the JDialog to be too small... only when the
mouse is released does the JDialog resize itself back up
to its minimum size.
Can I make it so that dragging the mouse beyond the minimum
size has no visible effect without setting resizable to false?