Packages  This Package  Prev  Next  Index  

§3.21 Interface TextFieldPeer

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  (II-§3.20)
{
        // Methods
    public abstract Dimension minimumSize(int  cols);	§3.21.1
    public abstract Dimension preferredSize(int  cols);	§3.21.2
    public abstract void setEchoCharacter(char  c);	§3.21.3
}

Methods

minimumSize

public abstract Dimension minimumSize(int cols)
Parameters:
cols - the number of columns
Returns:
the minimum dimensions needed to display the text field with the specified number of columns.

preferredSize

public abstract Dimension preferredSize(int cols)
Parameters:
cols - the number of columns
Returns:
the preferred dimensions needed to display the text field with the specified number of columns.

setEchoCharacter

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.
Parameters:
c - the echo character for this text field

Packages  This Package  Prev  Next  Index
Java API Document (HTML generated by dkramer on April 22, 1996)
Copyright © 1996 Sun Microsystems, Inc. All rights reserved
Please send any comments or corrections to doug.kramer@sun.com