Skip to main content

Posts

Showing posts from April 1, 2014

List and Textfield of java.awt class

SOURCE & COPIED FROM: http://www.tutorialspoint.com/awt/awt_quick_guide.htm AWT List Class Introduction The List represents a list of text items. The list can be configured to that user can choose either one item or multiple items. Class declaration Following is the declaration for  java.awt.List  class: public class List extends Component implements ItemSelectable , Accessible Class constructors S.N. Constructor & Description 1 List()  Creates a new scrolling list. 2 List(int rows)  Creates a new scrolling list initialized with the specified number of visible lines. 3 List(int rows, boolean multipleMode)  Creates a new scrolling list initialized to display the specified number of rows. Class methods <T extends EventListener> T[] getListeners(Class<T> listenerType)  Returns an array of all the objects currently registered as FooListeners upon this List. S.N. Method & Description 1 void add(String item)  Adds th