fixed a threading problem

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4522 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Tomasz Slota
2006-09-22 12:39:39 +00:00
parent 5f988bbe6d
commit 6bdafe06b4

View File

@ -33,6 +33,7 @@ import java.awt.event.MouseEvent;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import javax.swing.SwingUtilities;
import javax.swing.table.AbstractTableModel;
import org.openide.awt.StatusDisplayer;
import org.openide.cookies.LineCookie;
@ -107,8 +108,12 @@ public class OutputWindow extends TopComponent {
tblMdlResults.setViolations(violations);
if (violations.length > 0){
selectResultRow(0);
tblResults.getSelectionModel().setSelectionInterval(0, 0);
SwingUtilities.invokeLater(new Runnable() {
public void run() {
selectResultRow(0);
tblResults.getSelectionModel().setSelectionInterval(0, 0);
}
});
}
}