setSelectedValue « JList « Java Swing Q&A





1. Java: Jlist setSelectedValue() but ignoreCase    stackoverflow.com

myJList.setSelectedValue("someTHING", true); //if "SomeThing" in the list, it won't be selected
I want to set the value, but seems like setSelectedValue is case-sensitive, I want to select a value but ignore case-sensitive, ...

2. How to set multiple items as selected in JList using setSelectedValue?    stackoverflow.com

I have a jList that is populated dynamically by adding to the underlying listModel. Now if I have three Strings whose value I know and I do

for(i=0;i<3;i++){
    jList.setSelectedValue(obj[i],true);//true ...

3. error with setSelectedValue method for a JLIST    stackoverflow.com

I am having troubles with JList class. I am getting data from a vector to fill the JList and the list looks fine when I show it on screen. The list ...

4. problem with setSelectedValue Method for JList    stackoverflow.com

i am having troubles when i run the main class for the application. The fact is that the setSelectedValue method doesn't work. the code for the main class is the following:

DatabaseConnection.getInstance().connect("org.sqlite.JDBC", "jdbc:sqlite:db/Universidad.sqlite");
DatabaseTableManagers ...

5. problem with jList and setSelectedValue    forums.netbeans.org

Hi, This is not Netbeans related, but java related. I have quite a long list of strings which I put in a jList (which I name jListRef). I want to select ...

6. setSelectedValue in JList doesn't scroll - Urgent!    coderanch.com

Please can you help with the following: Here is an extract of the code I am using. JScrollPane scroller = new JScrollPane(); JList list = new JList(); scroller.setViewportView(list); ... ... String[] listData = OtherClass.getData(); //listData is populated using call to other class list.setListData(listData); String initialValue = OtherClass.getInitialValue(); list.setSelectedValue(initialValue,true); The result is that when the dialog contianing the list is displayed, all ...