Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Best Algorithm for Preferred Size of Dynamically Growing jTable

20 views
Skip to first unread message
Message has been deleted

Eric Sosman

unread,
May 20, 2013, 3:39:44 PM5/20/13
to
On 5/20/2013 3:23 PM, Haircuts Are Important wrote:
> I once had to build a large jTable and I noticed that after the table
> became large things weren't shown in the table.
>
> I forgot how I fixed it.
>
> Question: Is there some preferred way to adjust the size of a
> dynamically growing jTable.

A common practice is to put the JTable in a JScrollPane and
let the user decide how much screen real estate it should have.
In addition, you might try setPreferredScrollableViewportSize(),
although I don't know off-hand whether this does anything for a
JTable that's already displayed (if it doesn't, I imagine a call
to revalidate() might help).

> I'm using new Courier Font because I want the characters to be the
> same width.

Although this may affect the actual sizes, I doubt it makes
a difference in how readjustment happens.

--
Eric Sosman
eso...@comcast-dot-net.invalid
0 new messages