How to switch between programs in the same project

A Java project may have several different programs in it. More precisely, it is only possible for projects with applets (small Java programs which are invoked from html files and open their own window). Each applet is invoked from its own html file. The file specifies the name of the Java class which contains the program. For instance, the file Ring.html below will run the class Rings.class.

There is one html file for each program in the project. For instance, the project below has two html files: one for running the program Rings and another for running the program Writing.

When you run the project, only one of the programs gets to run. To find out which one gets to run, click on Link Order tab in the project window and see which html file is the highest. Ignore all the other kinds of files. For instance, if we run the project on the picture above, Rings gets to run:

Note that the name of the program which is running is written on top of the applet (circled in red on the picture above).

What do we do if we want to run Writing instead? We need to put Writing.html above Rings.html in Link Order. Note that switching them in files has no affect on the order in which the programs run.

To switch the order, highlight Writing.html

and drag it above Rings.html

Now run the project. You should see the Writing applet. If you still see Rings, chances are you were moving files in the Files tab, not Link Order.