Sept. 9, 2002
Lesson3.javafrom the class home page. Identify all the local and instance variables. Hint: There are three instance variables and one local variable.
Lesson3and run the applet. Try resizing the applet. What happened and why?
Colorsclass and notice all the class variables like
yellow. How do we know that they are class variables? Look at how the color yellow is used in the
init()method. See if you can figure out by looking at the documentation for the
TextFieldclass how to change the colors of the
TextFields. Try it out.
paintTextvariable to be a local variable in the
paint()method rather than an instance variable. What happens when you compile your program and why?