
173Uitools
% Now do something useful with the selected row’s data. . .
data = jtable.getModel.getValueAt(rowIdx,1); % column #2
% Alternate way to get the selected row’s data. . .
data = jtable.getActualRowAt(rowIdx);
% . . .
end % selectionCallbackFcn
4.1.5 JIDE Customizations
As noted above, table columns may be resized to dynamically t their data:
com.jidesoft.grid.TableUtils.autoResizeAllColumns(jtable);
The TableUtils class provides many other useful methods for tables.
†
For example,
TableUtils.ensureRowSelectionVisible(jtable);
TableUtils.ensureRowVisible(jtable,rowIndex);
columnIndex = TableUtils.findColumnIndex(jtable.getModel,columnName); ...