Double pytha = (Math.pow(e.getX() - circ.getCenterX(),2) + Math.pow(e.getY() - circ.getCenterY(),2));
Double pythaSqr = Math.sqrt(pytha);
circ.setRadius(pythaSqr);
gc.strokeOval(circ.getCenterX()-circ.getRadius(), circ.getCenterY()-circ.getRadius(), circ.getRadius(), circ.getRadius());
This is part of my paint program code and I can not get the oval to draw from the circle center, it alway uses my mouse click as its borders. I am trying to click on the screen and from the should the circle borders grow accoring to the radius in all directins equally. Hope you understand my questin (here I have done strokeOval(X-r,Y-r,r,r) but the it just grows in -x,y direction and if strokeOval(X,Y,r,r) then it grows in X,-Y dircetion in stead of growin equally to all directions using X,Y as center).