public void save() {
		try {
			File file = new File(System.getProperty("resources") + "/database/sprites");
			BufferedWriter writer = new BufferedWriter(new FileWriter(file));
			
			file.setWritable(true);
			DefaultTreeModel model = (DefaultTreeModel) tree.getModel();
			for(int x = 0; x<model.getChildCount(tree.getModel().getRoot()); x++) {
				writer.write(model.getChild(tree.getModel().getRoot(), x).toString());
				writer.newLine();
				Object child = model.getChild(model.getRoot(), x);
				for(int y = 0; y<model.getChildCount(child); y++) {
					writer.write(model.getChild(child, y).toString());
					writer.newLine();
				}
				writer.newLine();
			}
			
			writer.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}