What's the preferred way of this (based on header & contents width I believe)? TIA.
+3
A:
The Java Developer Almanac contains some good sample code for packing tables based on column width, this may be a good place to start.
Uri
2009-02-10 01:28:30
i'd suggest limiting the rows you check if it is a large table. We do things where the model does not actually contain all the data, some is fetched on demand. If you try to look at 1,000,000 rows to calculate width, you'll page in a lot of data!
John Gardner
2009-02-10 02:19:56
I agree. If I have heavy tables, I just use fixed sizes (unfortunately).
Uri
2009-02-10 02:54:35
+1
A:
Header and content widths, which include both characters and fonts. You'll need a wider column for a 14 point sans serif font than an 8 point.
duffymo
2009-02-10 02:15:48