From this link the author suggested:
table.setWidth("100%", true);
table.setColumnWidth(nameColumn, 35.0, Unit.PCT);
table.setColumnWidth(addressColumn, 65.0, Unit.PCT);
for CellTable column width to work, however in my project the nameColumn
contain an extra long text, then this column will occupy almost all browser view, apparently the column width does not work, Could anybody shed some light on this?
The nameColumn
defined as below:
TextColumn<Person> nameColumn = new TextColumn<Person>()
{
@Override
public String getValue( Person object )
{
return object.getUserName();
}
};