Information hiding

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top