Skip to main content

more options

Part 2. More on OO    Part 4. Programming style

Module 2, part 3. Applications and applets

Introduction

 

Contents

No. Topic Discussion
1. Applications.
Reading: Gries/Gries, Sec. 16.1, pp. 435–436.
Make a Java program into an application by declaring a static procedure main, with one parameter, of type String[] in some class. You don't need an IDE to execute an application. Just call method main.
2. Creating a stand-alone application. Not required in CS1130. Reading: Gries/Gries, Sec. 16.2, pp. 436–437. This topic is not required in CS1130. You can make an application even easier to use by putting it in a jar file. Then, just double-click its icon to execute the application (i.e. to call its method main). This is easy to do.
3. Applet. Not required in CS1130.
Reading: Gries/Gries, Sec. 16.3, pp. 438–441; Sec. 16.4, pp. 441–444.
This topic is not required in CS1130. An applet is a subclass of Java API class Applet or JApplet. An applet is meant to be embedded in an html web page. Sec. 16.3 tells you about inherited (from Applet or JApplet) methods that can be used to control execution when the applet is running on the web. Sec. 16.4 then tells you how to write an html page that contains the applet.