Example usage for javax.swing DefaultListSelectionModel isLeadAnchorNotificationEnabled

List of usage examples for javax.swing DefaultListSelectionModel isLeadAnchorNotificationEnabled

Introduction

In this page you can find the example usage for javax.swing DefaultListSelectionModel isLeadAnchorNotificationEnabled.

Prototype

public boolean isLeadAnchorNotificationEnabled() 

Source Link

Document

Returns the value of the leadAnchorNotificationEnabled flag.

Usage

From source file:Main.java

public Main() {
    setLayout(new BorderLayout());

    list = new JList(label);
    JScrollPane pane = new JScrollPane(list);

    DefaultListSelectionModel m = new DefaultListSelectionModel();

    m.addListSelectionListener(new ListSelectionListener() {
        public void valueChanged(ListSelectionEvent e) {
            System.out.println(e.toString());
        }/*  w  ww.j  a  v  a 2s . c  o  m*/
    });

    list.setSelectionModel(m);

    System.out.println(m.isLeadAnchorNotificationEnabled());

    add(pane, BorderLayout.NORTH);
}