ScrollPane « JList « Java Swing Q&A





1. JList and scrollpane issue    coderanch.com

import java.awt.*; import javax.swing.*; public class ScrollList { private JScrollPane getContent() { // Copied from comments section of JList class api. // This list model has about 2^16 elements. Enjoy scrolling. JList bigDataList = new JList(bigData); // We don't want the JList implementation to compute the width // or height of all of the list cells, so we give it a ...

2. A JList in a ScrollPane not showing    forums.oracle.com

/** * Creates a viewport if necessary and then sets its view. Applications * that don't provide the view directly to the JScrollPane * constructor * should use this method to specify the scrollable child that's going * to be displayed in the scrollpane. For example: *

 * JScrollPane scrollpane = new JScrollPane(); * scrollpane.setViewportView(myBigComponentToScroll); * 
* Applications should ...