Example usage for Java java.awt List fields, constructors, methods, implement or subclass
The text is from its open source code.
List() Creates a new scrolling list. | |
list() Prints a listing of this component to the standard system output stream System.out . | |
List(int rows, boolean multipleMode) Creates a new scrolling list initialized to display the specified number of rows. | |
list(PrintStream out, int indent) Prints out a list, starting at the specified indentation, to the specified print stream. | |
List(int rows) Creates a new scrolling list initialized with the specified number of visible lines. | |
list(PrintStream out) Prints a listing of this component to the specified output stream. |
void | add(String item) Adds the specified item to the end of scrolling list. |
void | add(String item, int index) Adds the specified item to the scrolling list at the position indicated by the index. |
void | addItemListener(ItemListener l) Adds the specified item listener to receive item events from this list. |
void | clear() |
boolean | contains(Point p) Checks whether this component "contains" the specified point, where the point's x and y coordinates are defined to be relative to the coordinate system of this component. |
String | getName() Gets the name of the component. |
String | getSelectedItem() Gets the selected item on this scrolling list. |
void | remove(String item) Removes the first occurrence of an item from the list. |
void | remove(int position) Removes the item at the specified position from this scrolling list. |
void | setEnabled(boolean b) Enables or disables this component, depending on the value of the parameter b . |
Dimension | size() Returns the size of this component in the form of a Dimension object. |