Example usage for javax.swing JList getDragEnabled

List of usage examples for javax.swing JList getDragEnabled

Introduction

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

Prototype

public boolean getDragEnabled() 

Source Link

Document

Returns whether or not automatic drag handling is enabled.

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);

    boolean b = list.getDragEnabled();
}

From source file:Main.java

public static void main(final String args[]) {
    String labels[] = { "A", "B", "C", "D", "E" };
    JFrame frame = new JFrame("Sizing Samples");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    JList jlist1 = new JList();
    jlist1.setListData(labels);/*from   w ww  . j av  a2s  .  c o m*/

    jlist1.setVisibleRowCount(4);
    JScrollPane scrollPane1 = new JScrollPane(jlist1);
    frame.add(scrollPane1, BorderLayout.NORTH);

    boolean b = jlist1.getDragEnabled();

    frame.setSize(300, 350);
    frame.setVisible(true);
}