T-Th 9:05, Hollister B14
or
T-Th 11:15, Phillips 101

CS1110: Introduction to Computing Using Java

Fall 2011

Instructors: David Gries and Steve Marschner

A4 Applet

The GUI for A4 should appear in the upper left of your computer screen. It is our solution to A4, as an applet. Don't be impatient; wait a minute to see whether the GUI for A4 appears in the top left of your screen.

An applet is a Java program that can be embedded in a webpage. You will learn how to make an applet later in the course. It is not difficult.

Below, you may see a square box between the double lines below (depending on our browser). This applet box is created by the applet tag, which in this case looks like this:

<applet code="A4.class" width="100" height="100" archive= "a4.jar">
Sorry, your browser does not do applets at the moment
</applet>

The archive argument indicates which file contains the program. It could be any URL. Here, the file is in the same directory as this html page.
The code argument indicates which class extends class JApplet.
The width and height arguments give the size of the applet box.
The text between the <applet> and </applet> tags appears when a browser is not set up to allow applets.

=====================

Sorry, your browser does not do applets at the moment

=====================