Re: Place JComponent in center of JDialog



On 29 Jun 2005 18:15:12 -0700, rhino2005 wrote:

> You can use BorderLayout.Center

Sure, but that does not provide the effect Martijn was after.
A BorderLayout.CENTER will put the component in the center
and *stretch* it to fit the available space, as opposed to
putting it in the center and *padding* the outside..

See Knute's solution for exactly what the OP wanted.

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
.



Relevant Pages