Packages This Package Prev Next Index
§3.5 Interface ChoicePeer
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 (II-§3.6)
{
// Methods
public abstract void addItem(String item, int index); §3.5.1
public abstract void select(int index); §3.5.2
}
addItem
public abstract void addItem(String item, int index)
- Adds an item to the choice menu at the specified position.
- Parameters:
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.
- Parameters:
index
- the selected item position
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