public void paintComponent(Graphics g) {
		if (getCreator().automaton.getEnvironmentFrame() !=null)
		if (!((AutomatonEnvironment)(getCreator().automaton.getEnvironmentFrame().getEnvironment())).shouldPaint()) 
			return;
//		EDebug.print(Thread.currentThread().getName());
		super.paintComponent(g);
		toolbar.drawTool(g);
		Graphics2D g2 = (Graphics2D) g;
		double newXScale = 1.0/transform.getScaleX();
		double newYScale = 1.0/transform.getScaleY();
		g2.scale(newXScale, newYScale);
		g2.translate(-transform.getTranslateX(), -transform.getTranslateY());
	}