Webswing 25.10
Webswing runs a Swing, JavaFX, or SWT app in the browser without source code changes. With webforJ, you embed that app in a web app and replace it one screen at a time. For the two to exchange messages, you add the Webswing API to the Swing app.
Webswing is a web server technology. It renders the desktop app on the server and streams the interface to the browser using HTML5 canvas, handling all user interactions transparently.
For an overview of the whole path, from running the desktop app in the browser to retiring it, see Swing modernization.
Moving a desktop Java app to the web?
Send us a screenshot of one screen and we'll reply with how it moves to webforJ.
What Webswing solves
Many organizations have substantial investments in Java desktop applications that contain critical business logic developed over years or decades. These applications often can't be easily rewritten due to:
- Complex domain logic that would be risky to recreate
- Integration with desktop-specific libraries or hardware
- Time and cost constraints of a full rewrite
- Need to maintain feature parity with the existing app
Webswing allows these applications to be web-accessible without modification. They keep their original features and appearance.
Integration with webforJ
The webforJ Webswing integration provides the WebswingConnector component, which allows you to embed Webswing-hosted applications directly within your webforJ app. This creates opportunities for:
Progressive modernization
Instead of an all-or-nothing rewrite, you can:
- Start by embedding your existing Swing app via
WebswingConnector - Build new features in webforJ around the embedded app
- Gradually replace Swing components with webforJ equivalents
- Eventually phase out the legacy app entirely
Hybrid applications
Combine modern web UI built with webforJ with specialized desktop features:
- Use webforJ for user-facing interfaces, dashboards, and reports
- Keep Swing for complex visualizations or specialized editors
- Maintain a single integrated app experience
Refer to Coming from Swing for comparisons between Swing components and their webforJ equivalents. The comparisons include relevant references to help you use each webforJ equivalent feature.
How it works
The integration operates through three layers:
- Webswing Server: runs your Java desktop app, capturing its visual output and processing user input
- WebswingConnector Component: a webforJ component that embeds the Webswing client, managing the connection and communication with the server
- Communication Protocol: bidirectional messaging that allows your webforJ app to send commands to the Swing app and receive events back
When a user accesses your webforJ app, the WebswingConnector establishes a connection to the Webswing server. The server creates or reconnects to an app instance, and begins streaming the visual state to the browser. User interactions (mouse, keyboard) are captured and sent to the server, where they're replayed on the actual Swing app.
Topics
Setup and Configuration
Install the Webswing server, register a Swing app in the admin console, and configure CORS so webforJ can embed it with WebswingConnector.
Communication
Exchange actions and events between a webforJ app and an embedded Swing app through WebswingConnector lifecycle and custom action handlers.
Modernization Tutorial
Modernize a Swing customer management app step by step by embedding it with WebswingConnector and layering in webforJ dialogs and forms.
Swing Look and Feel
Give an embedded Swing app the colors, fonts, buttons, and focus outlines of webforJ with the DWC Look and Feel for Swing, in light or dark.
Keep learning
ArticleModernize a Java Swing app without JavaScript: JavaOne 2026
ArticleRun a Java Swing Application in the Browser Without a Rewrite
ArticleJava Swing Alternatives: Where Business Apps Go Next
ArticleModernize a Java Swing application: an enterprise decision guide
ArticleJava Swing to web migration: pick the right path
ArticleModernize an ERP UI in Java without a big-bang rewrite