Resizing columns

The user can dynamically resize the columns in a table by dragging the right border of their header.
To resize a column by programming, use the following code, setting a size of 10 to the name column.

How to resize columns in a table

IlpTable tableComponent = new IlpTable();
// This table will contain Network Elements
IlpClass acceptedClass = IltNetworkElement.GetIlpClass();
tableComponent.setAcceptedClass(acceptedClass);
...
// Retrieve the IlpAttribute corresponding to the name in 
// IltNetworkElement class
IlpAttribute name = acceptedClass.getAttribute("name");
TableComponent.getTableColumn(name).setPreferredSize(10);
Note
The preferred width of a column can also be controlled through the preferredWidth property. For more information, see Customizing column headers and rows.