posted 21 years ago
// listOne is the JList and
// scrollOne is the JScrollPane
// listItems is a Vector of strings
listOne = new JList( listItems );
listOne.setCellRenderer(new TextListRenderer
(pageItem));
listItems.elementAt( startIndex ), true);
listOne.setFixedCellWidth(380);
listOne.setSelectionMode ( (ListSelectionModel.SINGLE_SELECTION);
listOne.setFont( new Font( "serif", Font.BOLD, 18 ) );
scrollOne = new JScrollPane( listOne, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS );