JList: getNextMatch(String prefix, int startIndex, Bias bias)
import javax.swing.JList;
public class Main {
public static void main(String[] argv) throws Exception {
String[] items = { "A", "B", "C", "D" };
JList list = new JList(items);
String prefix = "b";
int start = 0;
int itemIx = list.getNextMatch(prefix, start, javax.swing.text.Position.Bias.Forward);
}
}
Related examples in the same category