void (final ListSelectionEvent e) { int index = myTable.getSelectionModel().getLeadSelectionIndex(); if (index != -1) { UsageInfo usageInfo = myOverridingMethods.get(index); myUsagePreviewPanel.updateLayout(Collections.singletonList(usageInfo)); } else { myUsagePreviewPanel.updateLayout(null); } }