a simple Java-FX Application which Simulate the Approximation of Pi https://nextn.xyz
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

MontecarloPi.html 3.2 KiB

5 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <html><head>
  2. <SCRIPT src="./web-files/dtjava.js"></SCRIPT>
  3. <script>
  4. function launchApplication(jnlpfile) {
  5. dtjava.launch( {
  6. url : 'MontecarloPi.jnlp',
  7. jnlp_content : 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjxqbmxwIHNwZWM9IjEuMCIgeG1sbnM6amZ4PSJodHRwOi8vamF2YWZ4LmNvbSIgaHJlZj0iTW9udGVjYXJsb1BpLmpubHAiPg0KICA8aW5mb3JtYXRpb24+DQogICAgPHRpdGxlPk1vbnRlY2FybG9QaTwvdGl0bGU+DQogICAgPHZlbmRvcj5FZHVhcmQ8L3ZlbmRvcj4NCiAgICA8ZGVzY3JpcHRpb24+bnVsbDwvZGVzY3JpcHRpb24+DQogICAgPG9mZmxpbmUtYWxsb3dlZC8+DQogIDwvaW5mb3JtYXRpb24+DQogIDxyZXNvdXJjZXM+DQogICAgPGoyc2UgdmVyc2lvbj0iMS42KyIgaHJlZj0iaHR0cDovL2phdmEuc3VuLmNvbS9wcm9kdWN0cy9hdXRvZGwvajJzZSIvPg0KICAgIDxqYXIgaHJlZj0iTW9udGVjYXJsb1BpLmphciIgc2l6ZT0iMTA0NDEiIGRvd25sb2FkPSJlYWdlciIgLz4NCiAgPC9yZXNvdXJjZXM+DQogIDxhcHBsZXQtZGVzYyAgd2lkdGg9IjgwMCIgaGVpZ2h0PSI2MDAiIG1haW4tY2xhc3M9ImNvbS5qYXZhZngubWFpbi5Ob0phdmFGWEZhbGxiYWNrIiAgbmFtZT0iTW9udGVjYXJsb1BpIiA+DQogICAgPHBhcmFtIG5hbWU9InJlcXVpcmVkRlhWZXJzaW9uIiB2YWx1ZT0iOC4wKyIvPg0KICA8L2FwcGxldC1kZXNjPg0KICA8amZ4OmphdmFmeC1kZXNjICB3aWR0aD0iODAwIiBoZWlnaHQ9IjYwMCIgbWFpbi1jbGFzcz0ibW9udGVjYXJsb3BpLk1vbnRlY2FybG9QaSIgIG5hbWU9Ik1vbnRlY2FybG9QaSIgLz4NCiAgPHVwZGF0ZSBjaGVjaz0iYWx3YXlzIi8+DQo8L2pubHA+DQo='
  8. },
  9. {
  10. javafx : '8.0+'
  11. },
  12. {}
  13. );
  14. return false;
  15. }
  16. </script>
  17. <script>
  18. function javafxEmbedmontecarlopi() {
  19. dtjava.embed(
  20. {
  21. id : 'montecarlopi',
  22. url : 'MontecarloPi.jnlp',
  23. placeholder : 'javafx-app-placeholder',
  24. width : '800',
  25. height : '600',
  26. jnlp_content : 'PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjxqbmxwIHNwZWM9IjEuMCIgeG1sbnM6amZ4PSJodHRwOi8vamF2YWZ4LmNvbSIgaHJlZj0iTW9udGVjYXJsb1BpLmpubHAiPg0KICA8aW5mb3JtYXRpb24+DQogICAgPHRpdGxlPk1vbnRlY2FybG9QaTwvdGl0bGU+DQogICAgPHZlbmRvcj5FZHVhcmQ8L3ZlbmRvcj4NCiAgICA8ZGVzY3JpcHRpb24+bnVsbDwvZGVzY3JpcHRpb24+DQogICAgPG9mZmxpbmUtYWxsb3dlZC8+DQogIDwvaW5mb3JtYXRpb24+DQogIDxyZXNvdXJjZXM+DQogICAgPGoyc2UgdmVyc2lvbj0iMS42KyIgaHJlZj0iaHR0cDovL2phdmEuc3VuLmNvbS9wcm9kdWN0cy9hdXRvZGwvajJzZSIvPg0KICAgIDxqYXIgaHJlZj0iTW9udGVjYXJsb1BpLmphciIgc2l6ZT0iMTA0NDEiIGRvd25sb2FkPSJlYWdlciIgLz4NCiAgPC9yZXNvdXJjZXM+DQogIDxhcHBsZXQtZGVzYyAgd2lkdGg9IjgwMCIgaGVpZ2h0PSI2MDAiIG1haW4tY2xhc3M9ImNvbS5qYXZhZngubWFpbi5Ob0phdmFGWEZhbGxiYWNrIiAgbmFtZT0iTW9udGVjYXJsb1BpIiA+DQogICAgPHBhcmFtIG5hbWU9InJlcXVpcmVkRlhWZXJzaW9uIiB2YWx1ZT0iOC4wKyIvPg0KICA8L2FwcGxldC1kZXNjPg0KICA8amZ4OmphdmFmeC1kZXNjICB3aWR0aD0iODAwIiBoZWlnaHQ9IjYwMCIgbWFpbi1jbGFzcz0ibW9udGVjYXJsb3BpLk1vbnRlY2FybG9QaSIgIG5hbWU9Ik1vbnRlY2FybG9QaSIgLz4NCiAgPHVwZGF0ZSBjaGVjaz0iYWx3YXlzIi8+DQo8L2pubHA+DQo='
  27. },
  28. {
  29. javafx : '8.0+'
  30. },
  31. {}
  32. );
  33. }
  34. <!-- Embed FX application into web page once page is loaded -->
  35. dtjava.addOnloadCallback(javafxEmbedmontecarlopi);
  36. </script>
  37. </head><body>
  38. <h2>Test page for <b>MontecarloPi</b></h2>
  39. <b>Webstart:</b> <a href='MontecarloPi.jnlp' onclick="return launchApplication('MontecarloPi.jnlp');">click to launch this app as webstart</a><br><hr><br>
  40. <!-- Applet will be inserted here -->
  41. <div id='javafx-app-placeholder'></div>
  42. </body></html>