Create a scrollable list : Scrollpane « Swing JFC « Java






Create a scrollable list

 

import javax.swing.JList;
import javax.swing.JScrollPane;

public class Main {
  public static void main(String[] argv) throws Exception {

    JList list = new JList();
    JScrollPane scrollableList = new JScrollPane(list);
  }
}

   
  








Related examples in the same category

1.Creating a JScrollPane Container
2.Controlling the scrollbars in a JScrollPaneControlling the scrollbars in a JScrollPane
3.JViewport: Move and View JViewport: Move and View
4.ScrollPane Sample
5.Scrollpane rulerScrollpane ruler
6.Customized ScrollPaneCustomized ScrollPane
7.ScrollPane with imageScrollPane with image
8.Scrolling ProgrammaticallyScrolling Programmatically
9.A simple JScrollPane for a JList componentA simple JScrollPane for a JList component
10.JScrollPane with row and column headersJScrollPane with row and column headers
11.A simple JScrollPane demonstrationA simple JScrollPane demonstration
12.Watermark JScrollPane