![]()
written by
Robert Hanson
The OSP project has partnered with developers at St. Olaf College to convert OSP Java programs (applets and applications) to JavaScript using the java2script/SwingJS framework developed by Bob Hanson. The SwingJS website contains physics, math, and chemistry conversion examples. They are not "ported" to JavaScript. They are not recreated in JavaScript. The JavaScript "applets" are created in parallel with standard Eclipse-based Java development, along with their Java counterparts. In the end, the original functional of the Java applet or stand-alone application its virtually identical JavaScript counterpart, with all the layout, events, and functionality of the original. One of the most powerful and important features of Java -- reflection (the loading of classes on the fly, only as needed) -- is fully preserved, providing the modularity necessary for complex web application development.
The SwingJS developers maintain a GitHub repository for Java developers who want to convert their Java applets or Java applications to JavaScript, allowing continued, simultaneous one-source development of both Java and JavaScript.
ComPADRE is beta testing Citation Styles!
![]() <a href="https://www.compadre.org/portal/items/detail.cfm?ID=15346">Hanson, Robert. SwingJS: Converting Java Programs to JavaScript. February 5, 2020.</a>
![]() R. Hanson, , WWW Document, (https://chemapps.stolaf.edu/swingjs/site/swingjs/examples/index.html).
![]() R. Hanson, SwingJS: Converting Java Programs to JavaScript, <https://chemapps.stolaf.edu/swingjs/site/swingjs/examples/index.html>.
![]() Hanson, R. (2020, February 5). SwingJS: Converting Java Programs to JavaScript. Retrieved May 2, 2025, from https://chemapps.stolaf.edu/swingjs/site/swingjs/examples/index.html
![]() Hanson, Robert. SwingJS: Converting Java Programs to JavaScript. February 5, 2020. https://chemapps.stolaf.edu/swingjs/site/swingjs/examples/index.html (accessed 2 May 2025).
![]() Hanson, Robert. SwingJS: Converting Java Programs to JavaScript. 5 Feb. 2020. 2 May 2025 <https://chemapps.stolaf.edu/swingjs/site/swingjs/examples/index.html>.
![]() @misc{
Author = "Robert Hanson",
Title = {SwingJS: Converting Java Programs to JavaScript},
Volume = {2025},
Number = {2 May 2025},
Month = {February 5, 2020},
Year = {}
}
![]() %A Robert Hanson %T SwingJS: Converting Java Programs to JavaScript %D February 5, 2020 %U https://chemapps.stolaf.edu/swingjs/site/swingjs/examples/index.html %O text/html ![]() %0 Electronic Source %A Hanson, Robert %D February 5, 2020 %T SwingJS: Converting Java Programs to JavaScript %V 2025 %N 2 May 2025 %8 February 5, 2020 %9 text/html %U https://chemapps.stolaf.edu/swingjs/site/swingjs/examples/index.html Disclaimer: ComPADRE offers citation styles as a guide only. We cannot offer interpretations about citations as this is an automated procedure. Please refer to the style manuals in the Citation Source Information area for clarifications.
Citation Source Information
The AIP Style presented is based on information from the AIP Style Manual. The APA Style presented is based on information from APA Style.org: Electronic References. The Chicago Style presented is based on information from Examples of Chicago-Style Documentation. The MLA Style presented is based on information from the MLA FAQ. This resource is stored in a shared folder. You must login to access shared folders. |
SupplementsContributeSimilar MaterialsSwingJS: EJS Java to JavaScript Conversion Examples EjsS Manual Ch 04: Converting Models from Java to JavaScript Create your own physics simulations for Tablets using Easy Java/Javascript… Featured By
Open Source Physics |