Class1 contains a JTextField called field1 and a method getFieldText() that returns the text from field1. Class2 contains a JTextField called field2 and a constructor that takes a Class1 object as a parameter, which sets the text of field2 to the result of calling getFieldText() on the Class1 object.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
34 views1 page
(Field1 Getfieldtext (Field1.Gettext ) ) : Class
Class1 contains a JTextField called field1 and a method getFieldText() that returns the text from field1. Class2 contains a JTextField called field2 and a constructor that takes a Class1 object as a parameter, which sets the text of field2 to the result of calling getFieldText() on the Class1 object.