Differences Between Extending JApplet and Applet

You can use either one. Because JApplet actually extends Applet, much of the functionality is identical. There are a few differences, however.

With JApplet, you have access to the content pane, which can be called using getContentPane(). If you have a content pane of your own (such as a panel) that you want to replace it with, you can call setContentPane(). When you add components to your applet, you add them to the content pane, not the frame.

FRIDGE

Dude. Make sure you write an HTML page that can display your applet. That is the purpose of applets—to be called from within HTML. Just because it is ...

Get Java Garage now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.