My View-Controller
public class MainForm implements java.util.Observer{
@Override
public void update(Observable o, Object arg) {
System.err.println("update View ....");
this.textField_15.setText(String.valueOf(model.getThermalConductivity()));
/*
*****
*/
}
}
In the model I use methods
setChanged();
notifyObservers();
All events model updates are processed in the method “update”
How to divide the controller?
You might enjoy trying this example. For simplicity, the model extends
Observable, but several other approaches are mentioned with links to examples.