Matt
Matt

Reputation: 1211

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!

Upvotes: 0

Views: 1683

Answers (1)

Cratylus
Cratylus

Reputation: 54074

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.
E.g.

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

Upvotes: 1

Related Questions