Point p = new Point(e.getPoint()); if (!dragging && drawingArea.contains(p)) { pressed = true; dragging = true; currentROI = null; currentShape = null; anchor = p; handleMousePressed(p); }
Point p = e.getPoint(); if (!dragging && drawingArea.contains(p)) handleMousePressed(p, e.getClickCount());
    public void mousePressed(MouseEvent e)    {        Point p = new Point(e.getPoint());        if (!dragging && drawingArea.contains(p)) {            pressed = true;            dragging = true;            currentROI = null;            currentShape = null;            anchor = p;            handleMousePressed(p);         }    }