Example usage for javax.swing JList getVisibleRowCount

List of usage examples for javax.swing JList getVisibleRowCount

Introduction

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

Prototype

public int getVisibleRowCount() 

Source Link

Document

Returns the value of the visibleRowCount property.

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);
    // Get number of visible items
    int visibleSize = list.getVisibleRowCount();
}