public EditorFrame(Map<String, EditorLevelInformation> levels, EditorControl control, boolean exitOnClose)
	{
		super("Level Editor - Gravity");
		this.levels = levels;
		this.control = control;

		if (exitOnClose)
			setDefaultCloseOperation(EXIT_ON_CLOSE);
		else
			setDefaultCloseOperation(DISPOSE_ON_CLOSE);
		setFocusable(true);

		addKeyListener(this);
		selectedTool = SelectedTool.CURSOR;
		createMenu();
		content = new JPanel(new BorderLayout());
		if (levels.size() < 1)
		{
			currentLevel = 0;
			currentMap = 0;
			maxLevel = 0;
			maxMap = 0;
			addNewLevel();
		}
		else
		{
			currentLevel = 1;
			currentMap = 0;
			maxLevel = levels.size();
			maxMap = levels.get("level " + currentLevel).getMaps().size();
		}
		mainPanel2 = new EditorMainPanel(this, this.levels.get("level " + currentLevel).getMaps().get("map " + currentMap));
		mainPanel2.setPreferredSize(new Dimension(1001, 700));
		toolPanel = new EditorToolPanel(this);
		content.add(toolPanel, BorderLayout.EAST);
		content.add(mainPanel2, BorderLayout.CENTER);
		setContentPane(content);
		pack();
		setLocationRelativeTo(null);
		setVisible(true);
		Timer timer = new Timer(1000 / 60, this);
		timer.start();
	}