I have Java swing application. I want to convert to web base application. What is easiest way? Is there any tool available, preferably open source code?
Webswing is a web server that allows you to run any Java Swing application inside your web browser, using only pure HTML5.
JavaFX new fixes will continue to be supported on Java SE 8 through March 2022 and removed from Java SE 11. Swing and AWT will continue to be supported on Java SE 8 through at least March 2025, and on Java SE 11 (18.9 LTS) through at least September 2026.
Swing in Java is a lightweight GUI toolkit which has a wide variety of widgets for building optimized window based applications. It is a part of the JFC( Java Foundation Classes). It is build on top of the AWT API and entirely written in java. It is platform independent unlike AWT and has lightweight components.
Hint: Oracle has developed JavaFX to replace both Swing and AWT. Since Java SE 7, update 6 it is bundled with Java SE. "JavaFX is a set of graphics and media packages that enables developers to (...) deploy rich client applications that operate consistently across diverse platforms" [1].
There is a new open source project webswing.org. It is a web server where you deploy your swing application. The application is rendered to html canvas through websockets, so you get the exact same look and feel like on desktop.
AjaxSwing is a run-time tool and needs a server license for commercial use.
You might want to try Mia Transformer -parts of the website are in French-. They change Swing Java code to GWT Java Code and GWT changes it to Javascript and then if you want you can use Google V8 compiler for faster execution. Of course it is not 100%. We are going to try it for a large project and see if it works.
The other link provided to us was SwingWeb. Have not checked it out though.
Will keep you posted. If you come across a workable solution please share.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With