Lab2TherapistGUI

Lab2TherapistGUI - ECE309 Lab 2 - TherapistGUI (Spring...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
ECE309 Lab 2 - TherapistGUI (Spring 2010)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Due midnight Thursday January 21 Overview This program has the same basic function as the previous Lab1Therapist. (The logging function is slightly different.) In this lab, however, we interfaces to our user via a GUI ( a "Graphical User Interface" i.e. a graphics window with buttons and text fields) rather than a command-line interface in a DOS window. Interestingly, this change of I/O requires a total restructure of our Therapist program! "Total resturucture" sounds kind of heavy, but since we only had 7 lines of code in our while(true) processing loop, how much can we lose! Also, we'll see that we will use most of these same statements, just in a different code structure.(So I predict some code copying in our near future!) This lab provides detailed instructions since it is our first program with a GUI. Future lab instructions will assume that you are familiar with GUI procedures. We will continue to use the NotePad+DOSwindow development environment for this lab and the next ( RemoteTherapist ), and introduce the Eclipse development environment in the development of lab #4: ChatRoom. Teaching Points: GUI program structure: creating button, text area, scroll pane, and text field GUI objects building the GUI screen handling GUI screen events (when the user types in a text field or pushes a button) Controlling the user by controlling the GUI introduction to handling exceptions
Background image of page 2
introduction to thread awareness using the Java Class Library documentation Sleeping a thread References for Java concepts used in this lab In the ECE309 NOTES directory on Wolfware, see GUIbuild.html GUIevents.html In the Wolfware ECE309 LECTURES directory, see notes for Lectures 1,2,3. In the Java Class Library documentation (at http://java.sun.com/docs) see the documentation for the specific classes used in the lab. I would also recommend "The Java Tutorial" (4th edition) written by people at Sun MicroSystems. You can probably get it at any tech bookstore, or order it direct from Sun for $40. (See http://java.sun.com/books/java_series.html) This semester I'm evaluating this book as the text for the course, which currently has no suggested text. The book also comes with a CD with Java on it, among other things. Your comments on the book would be welcome. (You may "check out" my copy of the book and bring it back the next class period.) A note about import statements. We will introduce the use of the "wildcard" * notation to reduce the number of import statements you must type. If you don't know what directory/package a class is in, look up the class in the documentation. Right at the top, it will show what package the class is in. The package (the directory path) is what is shown on the import statement. Part 1 - GUI Build
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 26

Lab2TherapistGUI - ECE309 Lab 2 - TherapistGUI (Spring...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online