private void openModel() {
JFileChooser fileChooser = new JFileChooser();
fileChooser.setDialogTitle(getResourceString("dialog.openmodel.title"));
if (fileChooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
try {
ModelReader fileLoader = new ModelReader(fileChooser.getSelectedFile(),
elementFactory);
umlModel.reset();
tabbedPane.removeAll();
for (UmlModelElement elem : fileLoader.getElements()) {
umlModel.addElement(elem);
}
createEditor(fileLoader.getDiagrams().get(0));
} catch (IOException ex) {
JOptionPane.showMessageDialog(this, ex.getMessage(),
getResourceString("error.readfile.title"),
JOptionPane.ERROR_MESSAGE);
}