What's the preferred way of this (based on header & contents width I believe)?
The Java Developer Almanac contains some good sample code for packing tables based on column width, this may be a good place to start.