FileDocCategorySizeDatePackage
readonly.javaAPI DocExample1132Mon Mar 24 02:04:30 GMT 1997None

readonly

public class readonly extends Applet

Fields Summary
TextArea
area
Label
label
Constructors Summary
Methods Summary
public booleanaction(java.awt.Event e, java.lang.Object o)

		if (e.target instanceof Button) {
                        if ("toggleState".equals(o)) {
                                area.setEditable (!area.isEditable ());
                                label.setText ((area.isEditable () ?
                                         "Editable" : "Read-only"));
                                return true;
			}
		}
		return false;
	
public voidinit()

                setLayout (new BorderLayout (10, 10));
                add ("South", new Button ("toggleState"));
                add ("Center", area = new TextArea ("Help Me", 5, 10));
                add ("North", label = new Label ("Editable", Label.CENTER));