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.configand 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 应用程序?
基础教程推荐
- RabbitMQ:消息保持“未确认"; 2022-01-01
- 存储 20 位数字的数据类型 2022-01-01
- 问题http://apache.org/xml/features/xinclude测试日志4j 2 2022-01-01
- REST Web 服务返回 415 - 不支持的媒体类型 2022-01-01
- Struts2 URL 无法访问 2022-01-01
- 修改 void 函数的输入参数,然后读取 2022-01-01
- 使用堆栈算法进行括号/括号匹配 2022-01-01
- 无法复制:“比较方法违反了它的一般约定!" 2022-01-01
- 如何对 Java Hashmap 中的值求和 2022-01-01
- Spring AOP错误无法懒惰地为此建议构建thisJoinPoin 2022-09-13
