Link samples table to GUI events

This commit is contained in:
2018-09-12 09:11:22 +02:00
parent 8f8dfe1ba5
commit e2e7a7e872
2 changed files with 6 additions and 2 deletions

View File

@@ -703,7 +703,7 @@ public class Controller {
panel.add(buttonPanel, BorderLayout.SOUTH);
ok.setPreferredSize(new Dimension(200, ok.getPreferredSize().height));
cancel.setPreferredSize(new Dimension(200, ok.getPreferredSize().height));
JDialog dialogAskPuckDatamatrix = SwingUtils.showDialog(getMainFrame().getTopLevel(), "Puck Loading", new Dimension(400,600), panel);
dialogAskPuckDatamatrix = SwingUtils.showDialog(getMainFrame().getTopLevel(), "Puck Loading", new Dimension(400,600), panel);
cancel.addActionListener((ev)->{
dialogAskPuckDatamatrix.setVisible(false);
});

View File

@@ -34,7 +34,11 @@ public class SampleInfo extends HashMap {
int getInt(String key) {
try {
return Integer.valueOf((String) get(key));
Object val =get(key);
if (val instanceof Number){
return ((Number)val).intValue();
}
return Integer.valueOf((String) val);
} catch (Exception ex) {
return -1;
}