If the DrawPanel has a reference to the textfield then its methods can use that reference to update the textfield. Pass a reference to the textfield in the DrawPanel class's constructor.

Please...