Control over selection in list items is possible through three constants defined in ListSelectionModel.interface.
1. SINGLE_SELECTION
This constant is used if we want to restrict the selection to at most one item.
2. SINGLE_INTERVAL_SELECTION
This constant is used if we want to select the items in regular way, i mean in sequential way. So we can't select item at first position and an item at 4th position. We have to use shift key to select more then one item.
3. MULTIPLE_INTERVAL_SELECTION
This is the default selection mode for JList instance. In this case we can select items also with multiple interval, i.e. by pressing control key, we can do random selection of items, however both of the above is also applicable. View in details here
If want to know about how to use JList in swing application click here.
1. SINGLE_SELECTION
This constant is used if we want to restrict the selection to at most one item.
2. SINGLE_INTERVAL_SELECTION
This constant is used if we want to select the items in regular way, i mean in sequential way. So we can't select item at first position and an item at 4th position. We have to use shift key to select more then one item.
3. MULTIPLE_INTERVAL_SELECTION
This is the default selection mode for JList instance. In this case we can select items also with multiple interval, i.e. by pressing control key, we can do random selection of items, however both of the above is also applicable. View in details here
If want to know about how to use JList in swing application click here.
I appreciate your efforts in writing such a wonderful post...Thanks for sharing...Please check my links for
ReplyDeleteCall girl services in Jaipur
Call girl services in Jaipur
Call girl services in Jaipur
Call girl services in Delhi
Call girl services in Guwahati
Call girl services in Guwahati
Call girl services in Guwahati
Call girl services in Guwahati
Call girl services in Aerocity
Call girl services in Lucknow