GUI Interlude 2: Prelab Questions

Print a copy of this page and referring to chapters 4 and 5 from Java: An Introduction to Programming, answer the first 3 questions on your copy. The remaining two question can be answered by referring to the lab exercise. (You must turn in your answers at the beginning of your laboratory session.)

1. A JLabel is a component that is intended to be used for ________________.

2. Give a line of code that would add a JTextArea object named instructions to the left side of a JApplet object.

3. What method allows us to add text onto a JTextArea object?

4. If you wanted to create a GUI with two rows of three buttons each, you would use a ______________ layout.

5. What line of code will create a StringTokenizer that can break up a line into words?


Back to This Lab's Table of Contents

Forward to the Lab Exercise


Back to the Table of Contents

Back to the Introduction

Copyright 2000 by Prentice Hall. All rights reserved.