Link samples table to GUI events
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user