public class MyModel { //*2 Plain object, not GUI component // Hold our data, canvas calls us for latest when redraws private String text; //*1 Holds the data public MyModel (String text) { this.text = text; } public void setText (String text) { //*3 Set and Get this.text = text; //*3 } public String getText () { //*3 return text; //*3 } }