How to deploy swing application on web browser?(如何在 Web 浏览器上部署 Swing 应用程序?)
问题描述
我开发了一个大型摇摆应用程序.有几个类,每个类都创建自己的 JFrame,同时关闭前一个调用该类的类.
I have a big swing application that I have developed. There are several classes that each creates its own JFrame while closing the previous one which called this class.
我希望将其部署到 Web 浏览器中,并了解我需要将其转换为小程序.我是否必须在每个类中添加用于创建小程序的代码?还是有其他方法.
I wish to deploy this into a web browser and understand that I need to convert it to an applet. Do I have to add in code for creating applet in each of these classes? or is there some other way.
在我目前的情况下,每个类都会创建一个 JFrame,其中包含一些按钮,单击这些按钮将关闭当前 JFrame 并实例化一个新类,该类会创建另一个 <强>JFrame.
In my current situation each of the class creates a JFrame which has some buttons which on being clicked will close the current JFrame and instantiate a new class which creates another JFrame.
您能否帮助我并建议我如何解决我的问题?
Could you please help me and advice me on how to resolve my problem?
推荐答案
我刚刚使用了以下步骤:
I have just used below steps:
- 从 http://webswing.org/ 下载 Webswing
- 上传您的 jar 文件
- 将您的应用程序添加到
webswing.config
并使用 Java 8+ - 启动 Webswing 服务器,添加的应用程序 Swing 窗口将出现在您的浏览器中 http://localhost:8080/默认情况下
- Download Webswing from http://webswing.org/
- Upload your jar file
- Add your application to
webswing.config
and use Java 8+ - Start Webswing server and the added application swing window will appear in your browser at http://localhost:8080/ by default
这篇关于如何在 Web 浏览器上部署 Swing 应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何在 Web 浏览器上部署 Swing 应用程序?


- 如何指定 CORS 的响应标头? 2022-01-01
- GC_FOR_ALLOC 是否更“严重"?在调查内存使用情况时? 2022-01-01
- Eclipse 的最佳 XML 编辑器 2022-01-01
- 在 Java 中,如何将 String 转换为 char 或将 char 转换 2022-01-01
- 未找到/usr/local/lib 中的库 2022-01-01
- 转换 ldap 日期 2022-01-01
- 如何使 JFrame 背景和 JPanel 透明且仅显示图像 2022-01-01
- java.lang.IllegalStateException:Bean 名称“类别"的 BindingResult 和普通目标对象都不能用作请求属性 2022-01-01
- 将 Java Swing 桌面应用程序国际化的最佳实践是什么? 2022-01-01
- 获取数字的最后一位 2022-01-01