The JFC Swing Tutorial: A Guide to Constructing GUIs (2nd Edition)

 <  Day Day Up  >  

Questions

1:

On what thread should GUIs be created, to guarantee thread safety?

2:

Why should you be careful to minimize the time spent in event-handler code?

3:

What is the purpose of the setLabelFor method?

4:

What is the content pane?

5:

Describe the three code segments that must be implemented for an event handler.

6:

Which text component is best suited for controlling the format of a single line of user -entered text?

7:

What is lazy image loading and why would you use it?

Exercises

1:

Write the code that creates a label displaying the following text, with the italics and font size as shown in this screenshot:

2:

Convert the LunarPhases [12] example to use radio buttons instead of a combo box.

[12] You can find the LunarPhases source files here: JavaTutorial/uiswing/learn/example-1dot4/index.html#LunarPhases .

3:

Add a Show Dialog check box to the VoteDialog [13] example so that the dialogs are shown only if this check box is selected.

[13] You can find the VoteDialog source files here: JavaTutorial/uiswing/learn/example-1dot4/index.html#VoteDialog .

Answers

You can find answers to the Questions and Exercises online:

http://java.sun.com/docs/books/tutorial/uiswing/QandE/answers.html

 <  Day Day Up  >  

Категории