Owl Teach Yourself Java in 24 Hours, Fifth Edition
HOME / FEEDBACK / ORDER THE BOOK / OTHER BOOKS / PREVIOUS HOUR / NEXT HOUR / THANKS
ROGERS CADENHEAD

Hour 23: Working with Graphics

Online Interactive Learning Lab

How to create the PiePanel class and use it in the PieApplet applet.

Hour 23 Quiz

Question 1. Which one of the following is not a constant used to select a color?

1.a. Color.cyan

1.b. Color.teal

1.c. Color.magenta

The primary color of the Jacksonville Jaguars, teal, has gone unrepresented in Color.

Question 2. When you change the color of something and redraw it on a container, what must you do to make it visible?

2.a. Use the drawColor() method

2.b. Use the repaint() statement

2.c. Do nothing

The call to repaint() causes the paintComponent() method to be called manually.

Question 3. What do the initials RGB stand for?

3.a. Roy G. Biv

3.b. Red Green Blue

3.c. Lucy in the Sky with Diamonds

If c. were the right answer, you could use colors that would only be visible years later during flashbacks.

Notes and Corrections

  • None.

Source Files

Reader Questions

  • None.

Activities

   
HOME / FEEDBACK / ORDER THE BOOK / OTHER BOOKS / PREVIOUS HOUR / NEXT HOUR / THANKS

Search terms used to find this page: Java programming, teach yourself, 24 hours, how to, learn, Sams, Macmillan, Java2, JDK1.5, Java 1.5, JDK 1.5, SDK1.5, Java 2 SDK 1.5, SDK 1.5, Java 2 version 1.5, J2SE 1.5, J2SE 5, Java 2 Standard Edition 1.5, Java 2 Standard Edition 5, Java 2 SDK, Java SDK, Rogers Cadenhead, tutorial, hands-on, source code, code, javac, java, appletviewer, help, learning, applet, application, Java Plug-in, plugin, Swing, GUI, interface, Java2D, IO, Java Web Start, games, novice, beginner, neophyte, rookie

Valid HTML 4.01!

Valid CSS!