Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert Java Swing to web-based Application

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?

like image 376
Kamahire Avatar asked Mar 29 '11 10:03

Kamahire


People also ask

Can Java Swing be used in web applications?

Webswing is a web server that allows you to run any Java Swing application inside your web browser, using only pure HTML5.

Is Java Swing still used in 2022?

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.

Is Swing good for GUI?

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.

Does JavaFX replace Swing?

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].


2 Answers

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.

like image 108
webswingauthor Avatar answered Sep 23 '22 02:09

webswingauthor


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.

like image 39
Alok Arora Avatar answered Sep 23 '22 02:09

Alok Arora