Hi, can someone tell me the fault in this logic cause
Java gives me runtime exceptions all over the place:
class Model extends Observable implements TableModel{
.....
}
class MyTable extends JTable implements Observer{
......
}
Then I create my table like this:
Model m = new Model();
JTable t = new MyTable(m);
m.addObserver(t);
So when a user presses search, for example, the controller notifies the model and the model notifies the JTable. However, in update(Observerable o, Object oj) in MyTable I put super.repaint() so that the JTable will repaint. Does all this smell right or am I off the track? Thanks a lot for reading this huge post, i tried to keep it as simple as possible.