W.A.P to draw rectangle using graphics function.