 <blockquote> <p>if the dialog gets wider, but stays the same height, the number of rows should lessen, while the number of columns increases. </p> </blockquote> <p><a href="http://tips4java.wordpress.com/2008/11/06/wrap-layout/" rel="nofollow">Wrap Layout</a> might be what you are looking for.</p>