public void loadGraphFromFile() {
        String massesFilePath = loadGraphWindow.getMassesFilePath();
        String connectionMapFilePath = loadGraphWindow.getConnectionMapFilePath();

        try {
            String massesFile = FileUtils.readFileToString(new File(massesFilePath));
            String connectionMapFile = FileUtils.readFileToString(new File(connectionMapFilePath));
            NetworkGraph graph = GraphConverter.toNetworkGraph(massesFile, connectionMapFile);
            grammarWindow.getGrammarParser().setGraph(graph);
            grammarWindow.repaintGraphPanel();
        } catch (IOException ex) {
            Logger.getLogger(Controller.class.getName()).log(Level.WARNING, "Could not load the graph since the files could not be loaded: {0}", ex);
            JOptionPane.showMessageDialog(grammarWindow, "Could not load the given files: " + ex.getMessage(), "File Load Error", JOptionPane.ERROR_MESSAGE);
        }
    }