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