Table make Columns equal width the content


I am looking for a way to customize the width of my columns in the table equal to the content. I know this works with setColumnExpandRatio(column, 1.0f). However, I need the width of the columns to align textfields with the same width. And if i would get teh column width the return is -1.

Somebody has an idea ?