|
What happends if you enter text into the lower TextField and hit enter? A good answer might be:The user can enter text into the lower box, and edit it using the arrow keys and other keys of the keyboard. But when the user hits enter, nothing happens. | |
The |
public class Repeater extends Frame implements ActionListener
{
Label inLabel = new Label( "Enter Your Name: " ) ;
TextField inText = new TextField( 15 );
Label outLabel = new Label( "Here is Your Name :" ) ;
TextField outText = new TextField( 15 );
Repeater() // constructor
{
setLayout( new FlowLayout() ); // choose the layout manager
add( inLabel ) ;
add( inText ) ;
add( outLabel ) ;
add( outText ) ;
inText.addActionListener( this );
}
. . . . . .
}
|
Suggest a place to use the setEditable() method.