Here you can find the source of setSelectedValue(JList list, Object value)
public static void setSelectedValue(JList list, Object value)
//package com.java2s; import javax.swing.JList; public class Main { public static void setSelectedValue(JList list, Object value) { list.setSelectedValue(value, true); }// w ww. j a va2 s .c o m }