Information hiding

Discussion in 'Java' started by Ernst Denker, Dec 6, 2006.

  1. Ernst Denker

    Ernst Denker Guest

    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
     
    Ernst Denker, Dec 6, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Amir S.
    Replies:
    5
    Views:
    374
    Daniel T.
    May 29, 2004
  2. dotnetjunkie
    Replies:
    2
    Views:
    1,612
    priyadharsini
    May 6, 2008
  3. Alexander Eisenhuth

    Class design (information hiding)

    Alexander Eisenhuth, Sep 7, 2007, in forum: Python
    Replies:
    8
    Views:
    265
    Gregor Horvath
    Sep 9, 2007
  4. , India
    Replies:
    3
    Views:
    648
    Saeed Amrollahi
    Sep 25, 2007
  5. Ste
    Replies:
    41
    Views:
    810
    Thomas 'PointedEars' Lahn
    Aug 1, 2007
Loading...

Share This Page