public Point getKnobContainingPoint(Point pt) {

        if (firstCorner.contains(pt)) {
            // index[0] = 0;
            return new Point(((Rectangle) shape).x + ((Rectangle) shape).width, ((Rectangle) shape).y + ((Rectangle) shape).height);

        } else if (secondCorner.contains(pt)) {
            // index[0] = 1;
            return new Point(((Rectangle) shape).x, ((Rectangle) shape).y + ((Rectangle) shape).height);
        } else if (thirdCorner.contains(pt)) {
            // index[0] = 2;
            return new Point(((Rectangle) shape).x, ((Rectangle) shape).y);

        } else if (fourthCorner.contains(pt)) {
            //  index[0] = 3;
            return new Point(((Rectangle) shape).x + ((Rectangle) shape).width, ((Rectangle) shape).y);
        }
        return null;

    }