O'Reilly logo

Java Garage by Eben Hewitt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required