natTable.addConfiguration(new DefaultNatTableStyleConfiguration() {
{
cellPainter = new LineBorderDecorator(new CustomTextPainter(
true, true, 5, false, true));
}
}
natTable.addPaintListener(new PaintListener()
{
@Override
public void paintControl(PaintEvent e){
for (int i = 0; i < natTable.getRowCount(); i++)
{
InitializeAutoResizeRowsCommand rowCommand = new InitializeAutoResizeRowsCommand(natTable, i, natTable.getConfigRegistry(), new GCFactory(
natTable));
AutoResizeRowsCommand command = new AutoResizeRowsCommand(rowCommand);
natTable.doCommand(command);
}
}