java.awt
Class TextField

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.TextComponent
              |
              +--java.awt.TextField
All Implemented Interfaces:
ImageObserver

public class TextField
extends TextComponent

Current Limitations

The colum count of the text field determines the minimal display width.


Constructor Summary
TextField()
          Creates a new text field
TextField(int cols)
          Creates a new text field with the given colum count.
TextField(java.lang.String s)
          Creates a new text field that is initialized with the given String
TextField(java.lang.String text, int cols)
          Creates a new text field that is initialized with the given String and colum count.
 
Method Summary
 boolean echoCharIsSet()
          query if an echo char is set
 char getEchoChar()
          Returns the echo char or '\0' if none set.
 Dimension getMinimumSize()
           
 void paint(Graphics g)
           
 void setEchoChar(char c)
           
 
Methods inherited from class java.awt.TextComponent
addTextListener, dispatchEvent, getCaretPosition, getSelectedText, getSelectionEnd, getSelectionStart, getText, isEditable, isFocusTraversable, removeTextListener, select, selectAll, setCaretPosition, setEditable, setSelectionEnd, setSelectionStart, setText
 
Methods inherited from class java.awt.Component
addFocusListener, addKeyListener, addMouseListener, addMouseMotionListener, contains, enableEvents, findComponentAt, getBackground, getBounds, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getLocationOnScreen, getMaximumSize, getParent, getPreferredSize, getSize, getWidth, getX, getY, hasFocus, invalidate, isEnabled, isValid, isVisible, paintAll, processEvent, processFocusEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, repaint, repaint, requestFocus, setBackground, setBounds, setEnabled, setFont, setForeground, setLocation, setSize, setSize, setVisible, update, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextField

public TextField()
Creates a new text field

TextField

public TextField(int cols)
Creates a new text field with the given colum count.

TextField

public TextField(java.lang.String s)
Creates a new text field that is initialized with the given String

TextField

public TextField(java.lang.String text,
                 int cols)
Creates a new text field that is initialized with the given String and colum count.
Method Detail

echoCharIsSet

public boolean echoCharIsSet()
query if an echo char is set

getEchoChar

public char getEchoChar()
Returns the echo char or '\0' if none set.

getMinimumSize

public Dimension getMinimumSize()
Overrides:
getMinimumSize in class Component

paint

public void paint(Graphics g)
Overrides:
paint in class Component

setEchoChar

public void setEchoChar(char c)