简体   繁体   中英

Add applet to website with Eclipse

I've never really messed with Java or applets in general, but I want to start learning. How can I take a simple app I made in eclipse and make it able to be uploaded to a website and to be used in a browser. I know the question is really generic, but I really have no idea how to do this, so any help is appreciated! Thanks!

Applets are simply Java programs included in an HTML page.
The HTML page contains info to inform the browser which applet to load and where to place it inside a web page.
Eg

In `applet.html`
<applet code="SomApplet.class" width="300" height="300">
</applet>

A java application (specifically a Swing application) can be turned into an applet.
You have to extend JApplet and implement init .
So broadly speaking, modify your swing application you created in Eclipse to extend a JApplet, and create the required code tags.
For more help you should post your application code

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM