current jtable cell not returned



I've done some google searching but cannot seem to find the answer to
this problem. I have a jTable using my own table model. Other than the
first column being Boolean, all the others are Strings. There are ten
columns in all. The first column and the 4th and 5th are editable. I
have an add button that checks the first column to see if it is
checked (the Boolean), if so, it takes the data from the columns and
creates an object which is then inserted into a JTree. The problem is,
if I check the first column, change the data in the 4th, tab into the
5th and change that data, then press the add button, the data from the
5th column is not read. If, however, after editing the data in the 5th
column I just tab into the next column, the add button will see this
data. I cannot believe that the answer is to always force the user to
tab out of a column (or otherwise navigate), but I have thus far not
been able to identify how to return what has been keyed by the
getValueAt(int row, int col) method of my model. Any help would be
appreciated!

.


Quantcast