E
Ernst Denker
I've got a JTable. In an ActionListener I pick the currently selected
line, an object, forward this to a dialog, alter it there.
Now the table needs to be repainted witht he new data - so I need to
inform the table and or its model that its data has been altered.
To produced proper code, I try to hide as much information as possible -
myTable.getModel() returns a generic model that just offers the methods
as describe by the table model interface - and there doesn't seem to be
any method to inform the model and or table to repaint -
My concrete implementation, that extends the DefaultModel class, however
does have a method "fireTableCellDataChanged" that would do the job.
Is there any way of informing the table of the changed data without
revealing my concrete implementation and thus possibly violating the
information hiding concept?
Thanks in advance for your help.
Ernst Denker
line, an object, forward this to a dialog, alter it there.
Now the table needs to be repainted witht he new data - so I need to
inform the table and or its model that its data has been altered.
To produced proper code, I try to hide as much information as possible -
myTable.getModel() returns a generic model that just offers the methods
as describe by the table model interface - and there doesn't seem to be
any method to inform the model and or table to repaint -
My concrete implementation, that extends the DefaultModel class, however
does have a method "fireTableCellDataChanged" that would do the job.
Is there any way of informing the table of the changed data without
revealing my concrete implementation and thus possibly violating the
information hiding concept?
Thanks in advance for your help.
Ernst Denker