O'Reilly logo

Practical Web Technologies by V. Lau, P. K. Yuen

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

3.2. Controlling fonts and colors with Java applets

Undoubtedly, one of the most popular applications of using Java is through embedding applets in HTML/XHTML pages. An applet, in general, is a small program which will run automatically when downloaded into the browser. Java applets are applet programs written in Java. Throughout this chapter, the word applet refers to a Java applet.

3.2.1. A simple Java applet

Let’s convert the first Java program HelloWorld.java into an applet. Generally you need to perform the following tasks when creating any applet applications:

  • Create a Java program to generate the applet application.

  • Compile the source code files into bytecode or class.

  • Create an HTML/XHTML page and use the applet element <applet> to call ...

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