Archana Menon said:
i require a way through which i can select nearly 20 items in a single stretch using ctrl+A key. Making multiple selections is easy enough with the approach used below.
For specific use of the Ctrl-A keystroke you may be better off with a plain JList, ie, not using the renderer and list selection listener shown below. You can comment them out to see which option you like.
JList comes with a lot of keyboard support which you can find summarized here:
Java Look and Feel Guidelines. In the left frame scroll down to the section
Appendex A: Keyboard Navigation and click on the
Lists link below it.
You have all of this with the basic JList and without the renderer and SelectionManager classes. Using the renderer and SelectionManager interfere with the default keyboard support.