02/10/11 Created By- Priyanka Pareek 1

List Type Controls Working with Combo Boxes Other Useful Concepts 02/10/11 Created By.INTRODUCTION Java swing provides three controls that can be termed as List Type controls. These are: list box. and Spinner. combo box.Priyanka Pareek 2 .

Priyanka Pareek 3 . Two commonly used list type controls are Lists and Combo Boxes. 02/10/11 Created By. List Box: a list or List Box displays list of values in a box shaped control.List Type Controls List type controls let the user select from a list of values. SINGLE RANGE SELECTION. A list is cretaed through JList component class. A List allows three types of selection modes: SINGLE ITEM SELECTION. MULTIPLE RANGE SELECTION.

 Associated model of list is an object that contains the data displayed by the list.Priyanka Pareek 4 .  DefaultListModel is default implementation of ListModel which offers methods for manipulating list elements. The selection mode of list is specified through selectionMode Property. 02/10/11 Created By.  Whenever a user selects or unselects an item from a list. and MULTIPLE_INTERVL (for multiple range selection).  A list model (ListModel type object) is an associated object of a list (JList) that handles the list data. the list triggers a list selection event that is handled through <list>ValueChanged( ) event handler method. SINGLE_INTERVAL (for single item selection). which can take one of these values: SINGLE (for single item selection).

02/10/11 Created By.Priyanka Pareek 5 .

Sign up to vote on this title
UsefulNot useful