GUI Questions
GUI Questions
What is it called when a program is written to respond to the button clicks, menu
selections, and other actions of the user in whatever order the user does them?
a. Event-driven programming.
b. Action-driven programming.
c. User-driven programming.
d. Mouse-driven programming
A
2. Usually GUI programs are written by using existing software components provided
in a toolkit. The Java toolkit used in this chapter is the:
a. GUI toolkit
b. Abstract Windowing Toolkit
c. Graphics Event Toolkit
d. Java Enhancement Toolkit
B
4. What is the one component that nearly all GUI programs will have?
a. Frame
b. Mouse
c. Monitor
d. Button
A
7. Which of the following sets the frame to 300 pixels wide by 200 high?
a. frm.setSize( 300, 200 );
8. Fill in the blanks so that the following draws a Frame containing "Hello".
import java.awt.*;