home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / VCafe / JCLASS.BIN / KLG.JAR / jclass / beans / JCPropertyText.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-12-05  |  771 b   |  29 lines

  1. package jclass.beans;
  2.  
  3. import java.awt.Event;
  4. import java.awt.TextComponent;
  5. import java.awt.TextField;
  6. import java.beans.PropertyEditor;
  7.  
  8. class JCPropertyText extends TextField {
  9.    private PropertyEditor editor;
  10.  
  11.    JCPropertyText(PropertyEditor var1) {
  12.       super(var1.getAsText(), 20);
  13.       this.editor = var1;
  14.    }
  15.  
  16.    public void repaint() {
  17.       ((TextComponent)this).setText(this.editor.getAsText());
  18.    }
  19.  
  20.    public boolean action(Event var1, Object var2) {
  21.       try {
  22.          this.editor.setAsText(((TextComponent)this).getText());
  23.       } catch (Exception var3) {
  24.       }
  25.  
  26.       return true;
  27.    }
  28. }
  29.