CSc 4110/6110 Embedded Systems
Lab Experiment #4
Spring 2008
Instructor: Dr. Michael Weeks
Due date: April 14, in class

Using AWT with Java - Remote-control simulation

Java's Abstract Window Toolkit (AWT) provides a way to create graphical user interfaces (GUIs). These programs act in a different way than most programs, since they set up an interface and execute code based on interaction with the user. The programs stay active even after the main method completes.

Window components can have listeners to handle user interaction, by executing code based on, say, the user pressing a button.

In this lab, you will simulate a remote controller for a TV set-top box. The controller should have buttons for 0-9, stop, play, pause, fast-forward, rewind. See the following book and read chapter 12: Kim King, Java Programming From The Beginning, Norton, 2000.

Your task is to write a Java program using the AWT:

When your code works, port it to the iPAQ.

To make your program work with the Java Virtual Machine on the iPAQs, you may have to use an "older" compiler. You can do this with the command:
javac -target 1.1
which compiles the Java code for version 1.1. This should also work for version 1.3: javac -target 1.3 -source 1.3

Write-up what you did IN YOUR OWN WORDS. Do not simply re-word the directions, but explain what is going on. Avoid listing steps. Use outside sources as appropriate, and be certain to cite your sources. This lab should be done individually. Turn in one report per person.
 

    Questions:
  1. How is programming a GUI different from "standard" programming?
  2. How can you keep the "main" method running, to occasionally check for changes and make updates?
  3. How is your program different on the iPAQ than it was on the PC?
  4. How large is the byte code of your program?
  5. How does AWT compare to Swing? Research this, describe it, and be sure to cite sources in your answer. (This should be at least 2 pages.) As stated in class, Wikipedia is not a valid source for research work. Do not use Wikipedia for this assignment. You are advised not to even look at webpages for your answer. Instead, find books and articles in professional publications.