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

Interface ChoicePeer

Methods

The choice menu peer interface specifies the methods that all implementations of Abstract Window Toolkit choice menus must define.

public  interface  java.awt.peer.ChoicePeer
    extends java.awt.peer.ComponentPeer  
{
        // Methods
    public abstract void addItem(String  item, int  index);	
    public abstract void select(int  index);	
}


Methods


addItem

public abstract void addItem(String  item, int  index) 

Adds an item to the choice menu at the specified position.

ParameterDescription
item the string item
index the position


select

public abstract void select(int  index) 

Sets the selected item to be the item at the specified position.

ParameterDescription
index the selected item position



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