Textfield in awt
TextField class:
The
TextField class is used to created the text box control where the user can type
in the text.
Constructors:
ΓΌ
TextField(int size)
where the size argument is used to
specify the width of the TextField control
Methode:
a)
getText(): This method is used to return the
text present in the TextField control.
The general form is ,
String
getText()
b) setText(String s): This method is used is used to set the text which
we want to display in the TextField control.
The general form is ,
void setText(String s)
where ,
s is the text which we
want to set in the TextField control
Comments
Post a Comment