Auto-expand all columns in a table?

Hi,

when I add new columns to a table - how can I auto-expand the table columns and the whole table?

I think “table.setColumnExpandRatio(propertyId, 1f);” it the way to go.
But how can I iterate all my table columns and set the expand ratio within the iteration? Or would I have to explicit set this ratio for every single table column manually?

Table table = ...
for(Object colId : table.getContainerPropertyIds()){
     table.setColumnExpandRatio(colId, 1f);
}

should be simple enough?