fantastic tip prof!

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;

 }

it is working very well http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=2178msg8065;topicseen#msg8065

thanks!