home *** CD-ROM | disk | FTP | other *** search
- package jclass.beans;
-
- import java.awt.Event;
- import java.awt.TextComponent;
- import java.awt.TextField;
- import java.beans.PropertyEditor;
-
- class JCPropertyText extends TextField {
- private PropertyEditor editor;
-
- JCPropertyText(PropertyEditor var1) {
- super(var1.getAsText(), 20);
- this.editor = var1;
- }
-
- public void repaint() {
- ((TextComponent)this).setText(this.editor.getAsText());
- }
-
- public boolean action(Event var1, Object var2) {
- try {
- this.editor.setAsText(((TextComponent)this).getText());
- } catch (Exception var3) {
- }
-
- return true;
- }
- }
-