Q&A

Q1:Why isn't javax.swing.JApplet needed in the class statement of the Revolve applet?
A1: It isn't needed because of the import statement that makes all the javax.awt.swing classes available to the program. The only purpose of import is to make it easier to refer to classes in a program. If you don't use it, you have to use full class references such as javax.swing.JApplet instead of simply JApplet. You could write all of your Java programs without using import, though it would make the source files more difficult to understand.
Q2:If the Revolve applet only has one thread, what's the point of using threads at all?
A2: Multithreading has benefits even it's really just one-threading. One of the main benefits is that you can start, stop, and ...

Get SAMS Teach Yourself Programming with Java™ in 24 Hours, FOURTH EDITION 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.