I can not find the bug, please let me know where you found it.
The following is the modified version from your case.

I also fixed other minor bug.

/htdocs/ntnujava/ejsuser/2/users/web/taha_polygonraysn_pkg/taha_polygonraysn.propertiesFull screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
Press the Alt key and the left mouse button to drag the applet off the browser and onto the desktop. This work is licensed under a Creative Commons Attribution 2.5 Taiwan License
Download EJS jar file(1337.9kB):double click downloaded file to run it. (5 times by 5 users) , Download EJS source (7 times by 3 users) View EJS source