private Component buildList() {
		JPanel panel = new JPanel(new BorderLayout());
		panel.setBorder(BorderFactory.createEmptyBorder(2, 0, 0, 0));
		jList = new JList<SearchListEntry<T>>(model);
		JScrollPane jScrollPane = new JScrollPane(jList);
		jScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
		jList.setCellRenderer(new SearchListRenderer());
		jList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
		jList.addKeyListener(new ListKeyListener());
		jList.setVisibleRowCount(Math.min(model.getSize(), 20));
		jList.addListSelectionListener(e -> {
			if (e.getValueIsAdjusting()) {
				return;
			}
			T selectedItem = getSelectedItem();
			selectedConsumer.accept(selectedItem);
		});
		jList.addMouseListener(new GMouseListenerAdapter() {
			@Override
			public void mouseClicked(MouseEvent e) {
				if (singleClickMode && e.getButton() == MouseEvent.BUTTON1) {
					chooseItem();
					return;
				}
				super.mouseClicked(e);
			}

			@Override
			public void doubleClickTriggered(MouseEvent e) {
				chooseItem();
			}
		});
		panel.add(jScrollPane, BorderLayout.CENTER);
		return panel;
	}
Disposes the component and clears all the model data
Ghidra/Framework/Docking/src/main/java/docking/widgets/searchlist/SearchList.java