mouseDragged()
get the current position of cursor by using getX() and getY from
MouseEvent object. then resize it if required. finally, it invokes
process() method.
mouseMoved()
get the current position of cursor by using getX() and getY from
MouseEvent object. then resize it if required. finally, it invokes
process() method. it is exactly as same as mouseDragged() method.