public void init() { this.setLayout(new BorderLayout(5, 5)); l1 = new JOAJLabel(mTitle, JOAJLabel.LEFT); this.add(l1, BorderLayout.NORTH); buildList(); mList.setVisibleRowCount(mVisibleRows - 1); if (mAllowMultipleSelection) { mList.getSelectionModel().setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); } else { mList.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION); } if (mProtoCell != null) { mList.setPrototypeCellValue(mProtoCell); } else { mList.setPrototypeCellValue("SALT "); } JScrollPane listScroller = new JScrollPane(mList); this.add(listScroller, BorderLayout.CENTER); mList.addListSelectionListener((ListSelectionListener) mComp); }