Original Post
I Want To create a method to resize my circle, but i am having a little problem, it works but i dont feel that its effective enough. Anyone have any pointer on how to make this better?? x -> x coord y -> y coord xRadius ->width of the circle yRadius ->height of the circle public void mouseDragged(MouseEvent e) { int xLen = x + xRadius; int yLen = y + yRadius; if (xLen <= e.getX()) xRadius = xLen + (e.getX() - xLen); else xRadius = xLen - (xLen - e.getX()); if (yLen <= e.getY()) yRadius = yLen + (e.getY() - yLen); else yRadius = yLen - (yLen - e.getY()); }