Link samples table to GUI events

This commit is contained in:
2018-09-11 11:57:51 +02:00
parent 014116ba6f
commit 0cf9904929
3 changed files with 43 additions and 15 deletions

View File

@@ -30,6 +30,7 @@ import javax.swing.ImageIcon;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import javax.swing.table.DefaultTableModel;
@@ -219,6 +220,10 @@ public class MainPanel extends Panel {
}
void refresh() {
if (!SwingUtilities.isEventDispatchThread()){
SwingUtilities.invokeLater(()->{refresh();});
return;
}
repaint();
for (Puck p : Controller.getInstance().basePlate.getPucks()) {
int index = p.getUserIndex();