Programatically Select an Item in a JList
807607Oct 20 2006 — edited Oct 20 2006Hi,
I need to do this: Programmatically select an item in a JList.
JList.selectItem(0) will select the item 0 in the model but it will NOT visually highlight the selected item in the list.
Neither will ensureIndexIsVisible(0),
I need to automatically select and item in a list (highlight that item as well)
As if someone has clicked on that item with the mouse.. however they haven't you see, my program has done it, programatically.
Please don't refer me to the beginners guide to java, or the API documentation, the answer is not there.
Thanks