R
Russell Wallace
I'm looking at the scenario where a (non-editable) JTable is used to
display some records from a database. In this scenario, the user can use
the cursor keys or mouse to move around between cells in the table, and
there is a requirement for some other widgets to display detailed
information on the current record.
How do I get the JTable to notify me when the current row changes?
getEditingRow may give the current row at a particular time - I don't
know whether it'll work for non-editable tables. But it doesn't send
notice when it changes.
tableChanged has a mechanism for notice on data change, but that's a
different thing - I just need the current row.
Similarly, how do you programmatically change the current row and
column? setEditingRow doesn't discernibly do anything, even in an
editable table, and the blurb just says it "Sets the editingRow variable".
Thanks,
display some records from a database. In this scenario, the user can use
the cursor keys or mouse to move around between cells in the table, and
there is a requirement for some other widgets to display detailed
information on the current record.
How do I get the JTable to notify me when the current row changes?
getEditingRow may give the current row at a particular time - I don't
know whether it'll work for non-editable tables. But it doesn't send
notice when it changes.
tableChanged has a mechanism for notice on data change, but that's a
different thing - I just need the current row.
Similarly, how do you programmatically change the current row and
column? setEditingRow doesn't discernibly do anything, even in an
editable table, and the blurb just says it "Sets the editingRow variable".
Thanks,