public static void main(String[] tArgs) throws IOException {

		File f = null;

		JFrame frame = new JFrame();

		if(tArgs.length>0&&tArgs[0] != null) {
			f = new File(tArgs[0]).getAbsoluteFile();
		} else {
			f = FileChooser.chooseFile(frame, "Load", JFileChooser.FILES_ONLY);
		}

		FileWriter FW = new FileWriter();

		if(f == null) {
			return;
		}

		if(!f.exists()) {
			try {
				//noinspection ResultOfMethodCallIgnored
				f.createNewFile();
			} catch(IOException e) {
				e.printStackTrace();
			}
		}

		try {
			FW.readFromFile(f);
		} catch(IOException e) {
			e.printStackTrace();
		}

		FileWriterGUI FWG = new FileWriterGUI();
		FWG.setFileWriter(FW);
		FWG.updateStructure();

		frame.add(FWG);
		frame.pack();
		frame.setVisible(true);
		frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
	}