I have a JFrame with no LayoutManager (null is specified) and have
drawn sever small custom JComponents in it, one above the other. The
maximum width of the components is determined and I've tried to set the
window to that size plus a small buffer on the sides, but the width is
smaller than the minimum width permitted for a JFrame, so the width
actually gets set to the apparent minimum of 128 pixels. I'm fine with
that, but would like to know what the minimum width is before I display
(show()) the JFrame so that it doesn't have to get resized after being
displayed. JFrame.getMinimumSize() returns the preferred size of 720.
I'm hesitant to assume that it will always be 128 pixels as I suspect
this could be platform-dependent. If I just let it draw at the minimum
size, then I have to determine the placement of the components within
the window and draw them after the JFrame is displayed - maybe I'll
just have to resort to this, but I'd rather: know the minimum size in
advance, do the drawing, and then display the JFrame.
How can I find the the minimum JFrame width without first displaying a
JFrame?
----------------------------------
David Daniel
Associate Professor
New Mexico State University
----------------------------------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden