void () { myList.addListSelectionListener(new ListSelectionListener() { @Override public void valueChanged(ListSelectionEvent e) { if (myLookup.isLookupDisposed()) return; myHintAlarm.cancelAllRequests(); updateHint(); } }); myScrollPane.getVerticalScrollBar().addAdjustmentListener(e -> { if (myLookup.myUpdating || myLookup.isLookupDisposed()) return; myLookup.myCellRenderer.scheduleUpdateLookupWidthFromVisibleItems(); }); }