@Override
		public void mouseClicked(MouseEvent e) {

			clearStatusText();

			@SuppressWarnings("unchecked")
			JList<JCheckBox> list = (JList<JCheckBox>) e.getSource();
			int index = list.locationToIndex(e.getPoint());
			if (index < 0) {
				return;
			}
			boolean selected = checkboxes[index].isSelected();
			checkboxes[index].setSelected(!selected);

			listPanel.repaint();
		}
Mouse listener to get the selected cell in the list.
Ghidra/Framework/Project/src/main/java/ghidra/framework/main/ImportGhidraToolsDialog.java