FileDocCategorySizeDatePackage
text12.javaAPI DocExample1003Mon Mar 24 02:04:44 GMT 1997None

MyTextField

public class MyTextField extends TextField

Fields Summary
Constructors Summary
public MyTextField(String s, int len)

	super (s, len);
	enableEvents (AWTEvent.ACTION_EVENT_MASK);
    
Methods Summary
protected voidprocessActionEvent(java.awt.event.ActionEvent e)

        System.out.println ("The current text is: " + e.getActionCommand());
        TextField tf = (TextField)e.getSource();
        StringBuffer sb = new StringBuffer (e.getActionCommand());
        tf.setText (sb.reverse().toString());
        super.processActionEvent(e)  ;