Package java.awt.peer |
![]() Previous |
![]() Java API |
![]() Index |
![]() Next |
The text field peer interface specifies the methods that all implementations of Abstract Window Toolkit text fields must define.
public interface java.awt.peer.TextFieldPeer extends java.awt.peer.TextComponentPeer { // Methods public abstract Dimension minimumSize(int cols); public abstract Dimension preferredSize(int cols); public abstract void setEchoCharacter(char c); }
public abstract Dimension minimumSize(int cols)Return Value:
Returns the minimum dimensions needed to display the text field with the specified number of columns.
Parameter Description cols the number of columns
public abstract Dimension preferredSize(int cols)Return Value:
Returns the preferred dimensions needed to display the text field with the specified number of columns.
Parameter Description cols the number of columns
public abstract void setEchoCharacter(char c)Sets the echo character for this text field. Any character that the user types in the text field is echoed in the text field as the echo character.
An echo character is useful for fields where the user input shouldn't be echoed to the screen such as in the case of a text field for typing in a password.
Parameter Description c the echo character for this text field