JComponent () { final DefaultListModel model = new DefaultListModel (); for (PsiField member : myFields) { model.addElement(member); } myList = new JBList(model); myList.setCellRenderer(new MyListCellRenderer()); new DoubleClickListener() { @Override protected boolean onDoubleClick(@NotNull MouseEvent e) { if (myList.getSelectedValues().length > 0) { doOKAction(); return true; } return false; } }.installOn(myList); myList.setPreferredSize(JBUI.size(300, 400)); return myList; }