Chandler-Gilbert Community College Spring 2005
using textpad

Home
Schedule
Instructor
Links
Syllabus

  1. If you're working at home, follow the instructions in the syllabus for installing the compiler and editor software.
  2. From the Start menu, select Program Files..Textpad.  The Textpad window will open.
  3. In the Textpad window, select the menu option File..Save As and select the drive you want to store your java program on:
  4. Create a folder to hold your project by clicking the new folder icon:
  5. Give the folder a name that will help you remember what it contains.  Then double-click it to open it up.
  6. Enter a file name.  The name is very important.  It must match the name of the java class you'll be creating.  It must also end in .java:

    Click save.
  7. Enter your program:
  8. Save your program by clicking the diskette icon or by selecting the menu option File..Save or by typing ctrl-S.
  9. Compile your program, by selecting menu option Tools..Compile Java:
  10. Any compile errors will appear on the textpad screen.  Flip back over to your program and correct them by clicking on your program name in the document selector window on the left:

    (Note: the error in this program was that I named my class Hello, but the file is named hello.  Case is significant in Java.  Since class names should start with a capital letter, I changed my file name so it began with a capital letter and fixed the error.)
  11. Select the Tools..Run Java Applet menu option.  The program runs in an applet window as follows:

    In this class, we'll start with applets and move to applications later in the semester.
  12. Close the Applet Viewer window.  Save your program again for good measure.  Exit textpad.
  13. To run your program another day, locate the program in the windows explorer:

    Then, double-click your java program.  The first time you do this, you might receive the "Open With" dialogue box:

    Select textpad and check "Always use this program to open this file."  Click OK.  
  14. To print your program, select the menu option File..Print and, when the printer dialogue box comes up, click OK.
 

Home ] Up ] Instructor ] Links ] Syllabus ]

date last modified: 01/17/03
copyright 2005 Greg Swan