Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

automatically calculating column width in JTable

What's the preferred way of this (based on header & contents width I believe)?

like image 694
yanchenko Avatar asked Feb 10 '09 01:02

yanchenko


2 Answers

The Java Developer Almanac contains some good sample code for packing tables based on column width, this may be a good place to start.

like image 104
Uri Avatar answered Oct 22 '22 09:10

Uri


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.

like image 32
duffymo Avatar answered Oct 22 '22 09:10

duffymo