I want to get a value from a JTable, which I get from this
call_var = event_model.getValueAt(row, col);
then set the value at the desired location and subtract the value by 1;
I think I need to cast the object to integer and subtract the value by 1 and place back into the table.
What am I missing in this code segemnt? event_model.setValueAt((new Integer(call_var - 1)), row, col);
repeat code --
int row = 0;
int col = 16;
Object call_var;
call_var = event_model.getValueAt(row, col);
// call_var = 2
event_model.setValueAt((new Integer(call_var - 1)), row, col);
// need to set the value to 1
Dano
dskryzer@hotmail.com
What's your major malfunction
call_var = event_model.getValueAt(row, col);
then set the value at the desired location and subtract the value by 1;
I think I need to cast the object to integer and subtract the value by 1 and place back into the table.
What am I missing in this code segemnt? event_model.setValueAt((new Integer(call_var - 1)), row, col);
repeat code --
int row = 0;
int col = 16;
Object call_var;
call_var = event_model.getValueAt(row, col);
// call_var = 2
event_model.setValueAt((new Integer(call_var - 1)), row, col);
// need to set the value to 1
Dano
dskryzer@hotmail.com
What's your major malfunction