I am guessing i need to change and rewrite the codes to use F and cta bearing in mind that i still want to applet to allow the black line to be draggable which i notice is determined by the size x and size y and i noticed if i use size x = F*Math.cos(cta) and size y = F*Math.sin(cta), the applet is no longer draggable I am struck here