public void openFacts(){
        int returnVal = fileChooser2.showOpenDialog(this);
        if (returnVal == JFileChooser.APPROVE_OPTION) {
            File file = fileChooser2.getSelectedFile();
            String filepath = file.getAbsolutePath();
            factsLocation.setText(filepath);
            try{
                ParseXML parser = new ParseXML(filepath);
                queryCase = parser.getCaseBase();
                if(queryCase != null){
                    query = queryCase.getCases().get(0);
                    FactsFileText.read(new FileReader(file), file);
                    ActionLog.setForeground(Color.blue);
                    actionLog = "Facts file parsed successfully! ";
                    if(queryCase.getSize() > 1){
                        ActionLog.setForeground(Color.yellow);
                        actionLog += "More than one query case found. Selecting first case as query case. ";
                    }
                    ActionLog.setText(actionLog);
                }
                else{
                    ActionLog.setForeground(Color.red);
                    actionLog = "Facts failed to parse successfully! ";
                    ActionLog.setText(actionLog);
                }
                update();
            }catch(ParserConfigurationException e){
            }catch(SAXException e){
            }catch(IOException e){
            }
        } else {
            System.out.println("File access cancelled by user.");
        }
    }