public void handleMouseDown(MouseEvent evt) {
			int x = evt.getX();
			int y = evt.getY();
			if (!drawing.layers[controlPanel.getCurrentLayer()].visible && !menuBar.colorPicker.isSelected()) {
				JOptionPane.showMessageDialog(null, "The current layer is invisible.", "Can't draw there", JOptionPane.ERROR_MESSAGE);
			} else if (menuBar.colorPicker.isSelected()) {
				if (x<drawingPanel.getWidth() && x>0 && y<drawingPanel.getHeight() && y>0)
					controls.drawingActions.changeColor(drawing.getColorAt(x, y));
			} else {
				lineWidth = controlPanel.getLineWidth();
				lastX = x;
				lastY = y;
				mouseDown = true;
				boolean erase = menuBar.eraser.isSelected();
				synchronized(drawing.curves) {
					drawingPanel.currentCurve = drawing.startNewCurve(lastX, lastY, lineWidth, drawing.currentColor, erase, controlPanel.getCurrentLayer());
				}
				if (netController!=null && netController.connected == true) {
					netController.sendNewCurve(-1, lastX, lastY, lineWidth, drawing.currentColor, erase, controlPanel.getCurrentLayer());
				}
				drawingPanel.repaint();
			}
		}