@Override
	public void mouseDragged(MouseEvent e) {
		// TODO Auto-generated method stub
		/*System.out.println("Mouse: (" + e.getX() + ", " + e.getY() + ")");
		System.out.println("MouseOnScreen: (" + e.getXOnScreen() + ", " + e.getYOnScreen() + ")");
		System.out.println("Pane: (" + this.getX() + ", " + this.getY() + ")");
		*/
		/*if(clicked && rollerClicked && App.state == pointerState.ROLLER && e.getButton()!=MouseEvent.BUTTON3)
		{
			System.out.println("Dragging.");
			if(e.getYOnScreen() != lastScreenY)
			{
				App.robot.mouseMove(e.getXOnScreen(), lastScreenY);
			}
			if(e.getX()<0)
			{				
				App.robot.mouseMove(this.getLocationOnScreen().x, lastY);
				//horizontalScrollBar.
			}
			else if(e.getX() >this.getWidth())
			{
				App.robot.mouseMove(this.getLocationOnScreen().x+this.getWidth(), lastY);
			}
			//this.getGraphics().setColor(Color.);
			Color c = Color.BLACK;
			Graphics g = this.getGraphics();
			//this.getGraphics().setColor(c);
			g.setColor(c);
			System.out.println(g.getColor() + "   " + (Color)App.colorsBox.getSelectedItem());
			
			g.fillRect(lastX, lastY+10, e.getX()-lastX, 8);
		}
		else 
		*/
		if(clicked && (App.state == pointerState.DRAW || App.state == pointerState.EXCLUSION) && e.getButton()!=MouseEvent.BUTTON3)
		{
			//System.out.println("Dragging.");
			if(e.getYOnScreen() != lastScreenY)
			{
				App.robot.mouseMove(e.getXOnScreen(), lastScreenY);
			}
			if(e.getX()<0)
			{				
				App.robot.mouseMove(this.getLocationOnScreen().x, lastY);
				//horizontalScrollBar.
			}
			else if(e.getX() >this.getWidth())
			{
				App.robot.mouseMove(this.getLocationOnScreen().x+this.getWidth(), lastY);
			}
			
			Graphics g = this.getGraphics();
			
			if(App.state == pointerState.DRAW)
			{
				Color c = (Color)App.colorsBox.getSelectedItem();
				
				//this.getGraphics().setColor(c);
				g.setColor(c);
				System.out.println(g.getColor() + "   " + (Color)App.colorsBox.getSelectedItem());
			}
			else
			{
				Color c = Color.GRAY;
				g.setColor(c);
			}
			
			g.fillRect(lastX, lastY, e.getX()-lastX, 16);
			
		}
	}