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?
I have just used below steps:
- 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
Look into Java Web Start. This enables you to launch a Swing app from the web without changing a thing.
- Download creamtec.com-->AjaxSwing application
- Install this application in your system
- configure java in SetEnv.sh file and also configure the Ajaxswing application path
- Presently ajaxswing application launched.
- AjaxSwing > webapps > lib > paste your jar file and related images also
- To create configure file in Ajaxswing > config > this configure file name should be same on your package name
- run ajaxswing application
- select new
- type project name
- add related lib file (The all related jar connectors and jar files)
- type packagename.mainclass
- run server
- The system display the url and also launch in ie
来源:https://stackoverflow.com/questions/14979140/how-to-deploy-swing-application-on-web-browser