Example usage for javax.swing JList removeSelectionInterval

List of usage examples for javax.swing JList removeSelectionInterval

Introduction

In this page you can find the example usage for javax.swing JList removeSelectionInterval.

Prototype

public void removeSelectionInterval(int index0, int index1) 

Source Link

Document

Sets the selection to be the set difference of the specified interval and the current selection.

Usage

From source file:Main.java

public static void main(String[] argv) throws Exception {
    String[] items = { "A", "B", "C", "D" };
    JList list = new JList(items);

    int start = 0;
    int end = 0;//from ww w  . j av  a2 s  . c om
    list.removeSelectionInterval(start, end);
}