In java language Question 16 Which of the following statements makes the text in
ID: 3687974 • Letter: I
Question
In java language
Question 16
Which of the following statements makes the text in a JTextField uneditable?
Select one:
a. textField.setEditable(false);
b. textField.setUneditable(false);
c. textField.setEditable(true);
d. textField.setUneditable(true);
Question 17
When the user clicks a JCheckBox, a/an _____ occurs.
Select one:
a. ButtonEvent
b. ItemEvent
c. ActionEvent
d. CheckedEvent
Question 18
Which method determines if a JCheckBox is selected?
Select one:
a. None of the above
b. selected
c. isSelected
d. getSelected
Question 19
The logical relationship between radio buttons is maintained by objects of what class?
Select one:
a. MutualExclusionGroup
b. Group
c. RadioButtonGroup
d. ButtonGroup
Question 20
Method paintComponent is called when:
Select one:
a. a lightweight Swing component is displayed.
b.an application exits.
c. a lightweight Swing component is created.
d. a lightweight Swing component is clicked.
Question 21
Method _____ indicates that a Component should be refreshed on screen as soon as possible with a call to that control’s paintComponent method.
Select one:
a. refresh
b. redraw
c. repaint
d. repaintComponent
Question 22
In the Java coordinate system, the point (0, 0) is ________.
Select one:
a. The lower-right corner of the screen.
b. The upper-left corner of the screen.
c. The lower-left corner of the screen.
d. The upper-right corner of the screen.
Question 23
Which of the following statements about the Graphics object is true? Select all that apply.
Select one or more:
a. The Graphics class is abstract.
b. The Graphics object manages a graphics context.
c. The Graphics object is instantiated by the user.
d. The Graphics object is the argument to a lightweight GUI component's paintComponent method.
e. The Graphics object is an argument to class Component’s repaint method.
Question 24
The Java statement:
g.fillOval(290, 100, 90, 55);
Select one:
a. Draws a filled oval bounded by a rectangle with its upper-left corner at coordinates x=290, y=100, with width=90 and height=55.
b. Draws a filled oval with its center at coordinates x=290, y=100, with width=90 and height=55.
c. Draws a filled oval bounded by a rectangle with its center at coordinates x=290, y=100, with height=90 and width=55.
d. Draws a filled oval with its leftmost point at coordinates x=290, y=100, with width=90 and height=55.
Explanation / Answer
Q16
a. textField.setEditable(false);
Q17
d. CheckedEvent
Q18
b. selected
Q19
d. ButtonGroup
Q20
a. a lightweight Swing component is displayed.
Q21
c. repaint
Q22
b. The upper-left corner of the screen.
Q23
b. The Graphics object manages a graphics context.
Q24
b. Draws a filled oval with its center at coordinates x=290, y=100, with width=90 and height=55.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.