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 应用程序?


基础教程推荐
- 如何使用 Stream 在集合中拆分奇数和偶数以及两者的总和 2022-01-01
- 在螺旋中写一个字符串 2022-01-01
- 由于对所需库 rt.jar 的限制,对类的访问限制? 2022-01-01
- 首次使用 Hadoop,MapReduce Job 不运行 Reduce Phase 2022-01-01
- 如何强制对超级方法进行多态调用? 2022-01-01
- 如何在不安装整个 WTP 包的情况下将 Tomcat 8 添加到 Eclipse Kepler 2022-01-01
- 如何使用 Eclipse 检查调试符号状态? 2022-01-01
- Spring Boot Freemarker从2.2.0升级失败 2022-01-01
- 如何对 HashSet 进行排序? 2022-01-01
- Java 中保存最后 N 个元素的大小受限队列 2022-01-01