void (ListSelectionEvent e) { int index = myThreadList.getSelectedIndex(); if (index != currentSelectedIndex) { if (index >= 0) { ThreadState selection = myThreadList.getModel().getElementAt(index); AnalyzeStacktraceUtil.printStacktrace(consoleView, selection.getStackTrace()); } else { AnalyzeStacktraceUtil.printStacktrace(consoleView, ""); } currentSelectedIndex = index; } myThreadList.repaint(); }