public void mouseDragged(MouseEvent e) {
			Graphics2D g = image.createGraphics();
			D.x = e.getX() / (int) scale;
			D.y = e.getY() / (int) scale;
			T.y = Math.min(D.y, S.y);
			T.x = Math.min(D.x, S.x);
			// drag = true;
			setColor(g, false);
			switch (TabbedPanel.TOOL) {
			case SELECT:
				this.repaint();
				break;
			case PENCIL:
				g.setStroke(new BasicStroke(TabbedPanel.TOOL_Thicknes));
				g.drawLine(D.x, D.y, S.x, S.y);
				S.x = D.x;
				S.y = D.y;
				break;
			case ERASER:
				g.setStroke(new BasicStroke(TabbedPanel.TOOL_Thicknes));
				setColor(g, true);
				g.drawLine(D.x, D.y, S.x, S.y);
				S.x = D.x;
				S.y = D.y;
				break;
			case BRUSH:
				int thicknes = TabbedPanel.TOOL_Thicknes;
				if (TabbedPanel.TOOL_PropType == BRUSH_STYLE1) {
					g.fillOval(D.x - thicknes / 2, D.y - thicknes / 2,
							thicknes, thicknes);
				} else if (TabbedPanel.TOOL_PropType == BRUSH_STYLE2) {
					g.fillOval(D.x - thicknes / 2, D.y - thicknes / 2,
							thicknes, thicknes / 2);
				} else if (TabbedPanel.TOOL_PropType == BRUSH_STYLE3) {
					g.fillOval(D.x - thicknes / 2, D.y - thicknes / 2,
							thicknes / 2, thicknes);
				}
				break;
			}
			repaint();
			setXY(D.x, D.y);
		}