Hi,
I guess that in your model you have getters and setters of the variable "age". So when you call your listener you may pass an instance of your view, I guess that your wiew knows your model.
Then in your Control you can update your variable "age".
Hope you'll understand my bad english (I'm french).
By your constructor!
Here's one example
class MyControl implements ActionListener{
//attributs
MyView myView;
public MyControl(MiVew miView){
this.myView=miView;
}
public void ActionPerformed(){
this.myView.my_textField.setText(...);
...
}
}
With MVC you should create the model, view and controller in a driver class that creates all the compoents of the MVC and merges them together. You should be passing the model as a parm to the view in the constructor.
Example Driver Class:
public MVCDriverClass {
// constructor and any other methods needed
public void initialize() {
MyModelInterface model = new MyModel();
MyViewInterface view = new MyView();
MyControllerInterface controller = new MyController(mode, view);
model.initialize();
view.initialize();
view.showView();
}
}
Now in your model you need to make sure you are using the Observer pattern to notify all observers of any changes to the data model. Java already implements this for you if you want to use its utils. You simply need to extend the Observable class on your model to make it the subject and implement the Observer interface on each view you want the Subject (Observer) to notify of changes. You will see that the Observer interface has a method named update(Observer o, Object arg). You simply place any code in here that you need to update your UI values with. Let me know if you need any examples.