Text Field

Some important methods of Choice:
Method Action
setEchoChar(char) Echos the character instead of what is typed in.
getText() Returns the text as a string
setText(String) Sets text
getColumns() Returns width of text field
select(int,int) Select text between character two character positions (start indexing from 0)
selectAll() Select all the text
isEditable() Returns true/false as to whether the text is editable
setEditable(boolean) Sets whether or not editable
getEchoChar() Returns character used to mask input
echoCharIsSet() Returns true/false about whether set or not





Create an applet that adds a checkbox to it.
  1. you must create a Java applet with a class that extends the Applet class. (you must import the java.applet package).
  2. you should create an init() method that among other things creates a text field object and adds it to the applet's panel.


Here is the applet
Need Java Enabled Browser

Solution