Java java.awt List fields, constructors, methods, implement or subclass

Example usage for Java java.awt List fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.awt List.

The text is from its open source code.

Constructor

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.

Method

voidadd(String item)
Adds the specified item to the end of scrolling list.
voidadd(String item, int index)
Adds the specified item to the scrolling list at the position indicated by the index.
voidaddItemListener(ItemListener l)
Adds the specified item listener to receive item events from this list.
voidclear()
booleancontains(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.
StringgetName()
Gets the name of the component.
StringgetSelectedItem()
Gets the selected item on this scrolling list.
voidremove(String item)
Removes the first occurrence of an item from the list.
voidremove(int position)
Removes the item at the specified position from this scrolling list.
voidsetEnabled(boolean b)
Enables or disables this component, depending on the value of the parameter b .
Dimensionsize()
Returns the size of this component in the form of a Dimension object.