I have a dialog on which I need to display a SWT Table.
I need the table to display exactly one row. It should not display any additional rows.
This has to work on Windows as well as Linux.
For this I wrote the following code:
Table attributesTable = m_attributesTableViewer.getTable();
if(attributesTable != null)
int tableHeight = attributesTable.getItemHeight()*1 + attributesTable.getHeaderHeight();
Point tablePoint = attributesTable.computeSize(580, tableHeight);
attributesTable.setLayoutData(new GridData(tablePoint.x, tablePoint.y));
Now it happens so that Linux shows just 1 row as expected BUT Windows shows 3 rows instead of 1.
I don't know how to get around this problem.
Thanks and regards,