Menu

#44 SelectableTable selectedRow

open
nobody
5
2005-02-25
2005-02-25
shookie10
No

Using the SelectableTable which is also a sortable
table. I sort the first column and then select a row. I
get the correct row. I sort the first column again and
then select a row. I get the correct row. I sort on
another column(2nd, 3rd or 4th column) and then select
a row. I get the wrong value for:

public void actionPerformed(ActionEvent e) {
int selRow = table.getSelectedIndex();
int
mdlRow=sortableTableModel.getModelRowIndex
(selRow);
Integer orderNum = (Integer)table.getModel().getValueAt
(0, mdlRow);
}

The above code is used for selecting a row from the
SelectableTable.

Discussion


Log in to post a comment.