public static void openSchematic(File file)
	{
		try {
			FileReader reader = new FileReader(file);
			BufferedReader bReader = new BufferedReader(reader);
			
			String currentLine;
			
			//A list to hold all bubbles read from file
			List<Bubble> bubbles = new ArrayList<Bubble>();
			//Current bubble being built from file
			Bubble currentBubble = null;
			
			
			//All schematic files should have "end" as their last line, hence this should
			//loop until the end of file.
			while((currentLine = bReader.readLine()) != null)
			{
				if(currentLine.startsWith("bubble"))
				{
					if(currentBubble != null) bubbles.add(currentBubble);

					currentLine = currentLine.substring(currentLine.indexOf(":")+1);
					int id = Integer.parseInt(currentLine.substring(0, currentLine.indexOf(":")));
					
					currentLine = currentLine.substring(currentLine.indexOf(":")+1);
					int x = Integer.parseInt(currentLine.substring(0, currentLine.indexOf(":")));

					currentLine = currentLine.substring(currentLine.indexOf(":")+1);
					int y = Integer.parseInt(currentLine.substring(0, currentLine.indexOf(":")));

					currentLine = currentLine.substring(currentLine.indexOf(":")+1);
					int radius = Integer.parseInt(currentLine.substring(0, currentLine.indexOf(":")));
					
					String text = currentLine.substring(currentLine.indexOf(":")+1);
					
					currentBubble = new Bubble(id,x,y,radius,text);
				}
				else if(currentLine.startsWith("arrow"))
				{
					bubbles.add(currentBubble);
					Main.flowChart.setBubbles(bubbles);					

					currentLine = currentLine.substring(currentLine.indexOf(":")+1);
					int id1 = Integer.parseInt(currentLine.substring(0, currentLine.indexOf(":")));
					currentLine = currentLine.substring(currentLine.indexOf(":")+1);
					int id2 = Integer.parseInt(currentLine);	
					
					Main.flowChart.getBubbleById(id1).addArrowTo(Main.flowChart.getBubbleById(id2));
					
				}
				
			}
			Main.flowChart.repaint();
			
		} catch (Exception e) {
			e.printStackTrace();
		}
		
	}