Package java.awt.peer Previous
Previous
Java API
Java API
Index
Index
Next
Next

Interface TextFieldPeer

Methods

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);	
}


Methods


minimumSize

public abstract Dimension minimumSize(int  cols) 

Return Value:

Returns the minimum dimensions needed to display the text field with the specified number of columns.

ParameterDescription
cols the number of columns


preferredSize

public abstract Dimension preferredSize(int  cols) 

Return Value:

Returns the preferred dimensions needed to display the text field with the specified number of columns.

ParameterDescription
cols the 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.

ParameterDescription
c the echo character for this text field



Top© 1996 Sun Microsystems, Inc. All rights reserved.