In this lab you will combine your HTML web page from Lab 20 with your
CircleArea. Java application, by turning the latter into a Java applet. This exercise
will ...
Lab Experience 20, Part II Java Applets Objectives In this lab you will combine your HTML web page from Lab 20 with your CircleArea Java application, by turning the latter into a Java applet. This exercise will show you how straightforward it can be to write programs for the Web using Java. Exercises The steps required to convert a Java application to an applet are relatively simple: (1) Find your CircleArea.java program from the previous lab. (2) Copy your CircleArea.java program into your public_html folder and rename the copy CircleAreaApplet.java, using the Rename feature of Windows (right click on the file's icon to access this feature). This step is not strictly necessary, because program names are arbitrary. But it is good habit to include the name Applet in a Java applet, to distinguish it from an application. (3) Launch BlueJ (Start Menu - CS Course Software - BlueJ). From the Project menu, select “Open Non BlueJ”. Find your public_html folder and click the “Open in BlueJ” button. (4) Use BlueJ to edit your CirlceAreaApplet program as follows: Instead of GBFrame, use GBApplet, in the “extends” line at the top. This step allows you to use the part of the BreezyGUI package that supports applets. Then remove your “main” method. As we have discussed, this method is the way that a Java program is entered from the outside world. Since we will be running the program within a browser, this step becomes unnecessary. (5) Compile your program. (6) Put some helpful text into your HTML file, something like Here is a Program to Compute the Area of a Circle, and then insert the following line below that: Now when you open your HTML file in Explorer, you should see the applet in the appropriate place. When you have reached this stage, let me know so I can take a look at your new web page.