Mapping Model to View

Step 1

In the Model, provide a "SelectorString" for the screen component:

public class HelloModel {     
    private String name; // this is the selectorstring for a name STextfield     
    public void setName(String inName) {         
        name = inName;     
    public String getName() {         
        return name;     

Step 2

In the View, associate the model selectorstring with the Swing component:

STextField t = new STextField();         
//associate this component with a variable called name in the model 
add(t, BorderLayout.EAST);