How to deploy swing application on web browser?

…衆ロ難τιáo~ 提交于 2019-12-06 05:11:30

问题


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.

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.

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?


回答1:


I have just used below steps:

  1. Download Webswing from http://webswing.org/
  2. Upload your jar file
  3. Add your application to webswing.config and use Java 8+
  4. Start Webswing server and the added application swing window will appear in your browser at http://localhost:8080/ by default



回答2:


Look into Java Web Start. This enables you to launch a Swing app from the web without changing a thing.




回答3:


  1. Download creamtec.com-->AjaxSwing application
  2. Install this application in your system
  3. configure java in SetEnv.sh file and also configure the Ajaxswing application path
  4. Presently ajaxswing application launched.
  5. AjaxSwing > webapps > lib > paste your jar file and related images also
  6. To create configure file in Ajaxswing > config > this configure file name should be same on your package name
  7. run ajaxswing application
  8. select new
  9. type project name
  10. add related lib file (The all related jar connectors and jar files)
  11. type packagename.mainclass
  12. run server
  13. The system display the url and also launch in ie


来源:https://stackoverflow.com/questions/14979140/how-to-deploy-swing-application-on-web-browser

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!