private void loadFile(File file){
        try {
            numberOfLinesInFile = 0;
            BufferedReader reader = new BufferedReader(new FileReader(file));
            String line = null;
            while ((line = reader.readLine()) != null) {
                numberOfLinesInFile++;
            }
            reader.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            System.out.println("Apparently something happened. Reason: loadFile");
            e.printStackTrace();
        }
        System.out.println("File loaded successfully");
    }