Table sorting order

Hi! Can anyone help?
How can i always keep my table sorted by definite column?
For example: i have col1, col2, col3 and after i click on col2 or col3 table firstly should be sorted by col1, and then col2 or col3.
code snippets are welcomed:)

Just override the sort(…) method of either the table or the container.

public void sort(Object[] propertyId,
                 boolean[] ascending)
          throws UnsupportedOperationException

Just add your col2+col3 to the array of propertyId’s

André

Already did so. Thought there might be a more elegant way:)

Thanks.