S
Seref Arikan
Hi,
I am using a custom table model, to keep a vector of a custom class,
and everything works fine. I have custom renderers and editors for my
types
The problem is, when a cell is in editing mode , displaying my custom
control ( which is a jtextfield actually )with a new typed value in
it , the user can click another button on the form, to add a new row
to table. The user will assume that the editing is complete and a new
row will be added, which is perfectly normal.
But when this happens, sometimes the value in the textbox gets lost,
and the new row is added. Somehow, the value in textbox in edit mode,
can't be written to the custom table model i am using.
The add new row button adds a new element into the vector in custom
table model instance, and calls fireTableDataChanged(). somehow the
new value in textbox can't be written to the corresponding field in
table model. I believe there is something i am missing, since this
should be a pretty common scenario.Any recommendations would be great.
Best Regards
I am using a custom table model, to keep a vector of a custom class,
and everything works fine. I have custom renderers and editors for my
types
The problem is, when a cell is in editing mode , displaying my custom
control ( which is a jtextfield actually )with a new typed value in
it , the user can click another button on the form, to add a new row
to table. The user will assume that the editing is complete and a new
row will be added, which is perfectly normal.
But when this happens, sometimes the value in the textbox gets lost,
and the new row is added. Somehow, the value in textbox in edit mode,
can't be written to the custom table model i am using.
The add new row button adds a new element into the vector in custom
table model instance, and calls fireTableDataChanged(). somehow the
new value in textbox can't be written to the corresponding field in
table model. I believe there is something i am missing, since this
should be a pretty common scenario.Any recommendations would be great.
Best Regards