Repeater Applet

Classic programmed-learning exercises, refreshed for modern Java and presented in the current MrStyner.com portfolio style.

Modern Java noteThis archive has been refreshed for Java 25 LTS. Core language concepts remain useful, while outdated setup instructions and browser-era Java are labeled or replaced. Java 26 is the current feature release; Java 25 is used here as the stable teaching baseline.
Historical topic: Java appletsModern web browsers do not run Java applets. The Applet API was deprecated for removal before Java 25 and was removed in Java 26. Treat applet examples on this page as historical object-oriented/GUI examples; for new desktop interfaces use Swing where appropriate or JavaFX/OpenJFX.
go to previous page   go to home page   go to next page

Answer:

Yes. (If you have not seen applets yet, you can skip to the end of this chapter.)

Repeater Applet

The GUI components from Swing can be used by applets. Here is the JApplet version of the text echo application:

Embedded Java applet removed: modern browsers do not support Java applets. The surrounding source code is retained for historical study.

Here is the HTML that placed this applet on this Web page:


<center>
<applet code="TextRepeaterApplet.class" width="300" height="100">
</applet>
</center>

QUESTION 15:

When the user types into the top text fieldof the applet and hit return, what type of event is generated?