private Format getFileFormat(File file) {
		BufferedReader br;
		String line;
		String [] parts;
		Scanner scanner = new Scanner("");
		
		try {
			br = new BufferedReader(new FileReader(file));
			
			// Skip the lines that don't contain data (comments and such)
			while((line = br.readLine()) != null) {
				scanner = new Scanner(line);
				if(scanner.hasNextInt()) break;
			}
			
			if(line == null) {
				br.close();
				return Format.Unknown;
			}
			
			// Count the number of substrings in line, by splitting it around sets of white-space characters
			line = line.trim(); // Remove leading and trailing whitespace, so it doesn't mess with 'split'
			parts = line.split("[\\s ]+");
			br.close();
			
			if(parts.length == 2)
				return Format.Simple;
			else if(parts.length >= 9)  // This allows comments in the data line. (Normal line gives the length of 9)
				return Format.Full;
		} catch (IOException e) {
			JOptionPane.showConfirmDialog(mainFrame, 
					"Can't read the file!",
					"Error", JOptionPane.ERROR_MESSAGE);
			e.printStackTrace();
			return Format.ReadError;
		}
		
		return Format.Unknown;
	}