if (filechooser.showOpenDialog(AbstractFrame.this) != JFileChooser.APPROVE_OPTION) {
return;
}
String path = filechooser.getSelectedFile().getAbsolutePath();
InputParser parser = new InputParser();
parser.parse(path);
if (!parser.isOk()) {
JOptionPane.showMessageDialog(
AbstractFrame.this,
"Errore nel parsing del file di input. "
+ parser.getMessage(), ERRORE_MSG,
JOptionPane.ERROR_MESSAGE);
return;
}
editPanel.setNp(parser.getN());
editPanel.setXp(parser.getX());
editPanel.setYp(parser.getY());
editPanel.setPreferredSize(new Dimension(1200, 800));
editPanel.setSize(new Dimension(1200, 800));
XML_PARSED = false;
FILE_OPENED = true;