changes made:
fixed the " with ' which is giving some error message in Ejs 4.3.3
re arrange to usual layout and color scheme
made the 2 x1 and x2 points drag-gable to improve usability
made feedback immediate, improve user experience
added frequency = 1/T
added phase lead of x1 to x2 = (xval2-xval)/lambda*2*Math.PI;
added a better code to code for phase lead in multiple of 2*Math.PI thanks to Hwang Fu-Kwun expert advise

if (Math.abs(phi%(2*Math.PI)-enterphi%(2*Math.PI)) < 0.1){
phicorrect = " Yes";
  phicorrectbackground = java.awt.Color.GREEN;
  else {
  phicorrect = " No";
  phicorrectbackground = java.awt.Color.RED;


[s]work in progress[/s]