Friday, April 26, 2002 09:21 AM
You should limit the size of the JScrollPane, which contains your list.
JList list = new JList();
JScrollPane scrollPane = new JScrollPane(list);
// for layouts, which let the component to assume its preferred size
scrollPane.setPreferredSize(new Dimension(100, 200));
// or for null layout
scrollPane.setBounds(10, 10, 100, 200);