954,536 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Java Applets

Hey, I have a question about Java Applets. I wrote a small applet(just one file) and could run it in my web browser, by making this html file:

<APPLET CODE="MyApplet.class" WIDTH=400 HEIGHT=400>
</APPLET>


And it worked just fine.

I am going to make a bigger project and I am going to make it an applet.

How is this gonna work if I have many classes and packages?

Does only Main class extends JApplet? Or each class should extend JApplet?

Do I have to specify all *.class in html code?

Thanks for your help, I appreciate it.

slatk3y
Newbie Poster
19 posts since Jul 2009
Reputation Points: 10
Solved Threads: 1
 

Hey, I have a question about Java Applets. I wrote a small applet(just one file) and could run it in my web browser, by making this html file:

<APPLET CODE="MyApplet.class" WIDTH=400 HEIGHT=400>
</APPLET>

And it worked just fine.

I am going to make a bigger project and I am going to make it an applet.

How is this gonna work if I have many classes and packages?

Does only Main class extends JApplet? Or each class should extend JApplet?

Do I have to specify all *.class in html code?

Thanks for your help, I appreciate it.

Only your main class needs to be specified in that HTML code. And make sure all the files your Main class requires are in the same Package as Main Class.Only Main Class needs to extend JApplet.

gunjannigam
Junior Poster
147 posts since Aug 2009
Reputation Points: 40
Solved Threads: 15
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: