public static void readFile(String fileName) {
        try {
            Scanner scanner = new Scanner(new File(fileName));
            
            scanner.useDelimiter(System.getProperty("line.separator")); 
 
            while (scanner.hasNextLine()) {
                parseLine(scanner.next());
            }
          scanner.close();
        } catch (FileNotFoundException e) {
            JOptionPane.showMessageDialog(null, "Input file not found", "Error",
                    JOptionPane.ERROR_MESSAGE);
            System.exit(0);
        }
      } // end method readFile