(TCOs 1, 4, and 6) _____ is used to display a series of items from which the use
ID: 2246636 • Letter: #
Question
(TCOs 1, 4, and 6) _____ is used to display a series of items from which the user may select one or more items.
Flag this Question
Question 23 pts
(TCOs 1, 4, and 6) To allow for any size list to be displayed in a JList, you should
Flag this Question
Question 33 pts
(TCOs 1, 4, and 6) Which of the following is false?
Flag this Question
Question 43 pts
(TCOs 1, 4, and 6) Which method will return the first element in an ArrayList employees?
Flag this Question
Question 53 pts
(TCOs 1, 4, and 6) The number of items visible in a JList can be set using the _____ method.
Flag this Question
Question 63 pts
(TCOs 1, 4, and 6) Which component allows users to access a layer of GUI components via a tab?
Flag this Question
Question 73 pts
(TCOs 1, 4, and 6) The title of the tab is specified using the _____ method.
Flag this Question
Question 83 pts
(TCOs 1, 4, and 6) Suppose ArrayList cities contain the two strings {“Chicago”, “Miami”}. Which of the following methods will cause the list to become {“Chicago”, “Houston”,“Miami”}?
Flag this Question
Question 93 pts
(TCOs 1, 4, and 6) All objects have a _____ method, which returns a String representation of the object.
Flag this Question
Question 103 pts
(TCOs 1, 4, and 6) If your GUI has multiple tabs and you want to know the index of the tab currently selected, use the method
JLabelExplanation / Answer
1)_____ is used to display a series of items from which the user may select one or more items.
Answer: JList
Explanation:
JList is used to display a series of items from which the user may select one or more items.
2)To allow for any size list to be displayed in a JList, you should
Answer: create the list in a JScrollPane.
Explanation:
To allow for any size list to be displayed in a JList, you should create the list in a JScrollPane.
3) Which of the following is false?
Answer:
The size of anArrayListcan be determined via itslengthinstancevariable.
4) Which method will return the first element in an ArrayList employees?
Answer:
employees.get(1)
5) The number of items visible in a JList can be set using the _____ method.
Answer: setVisibleRowCount
6)Which component allows users to access a layer of GUI components via a tab
Answer: JTabbedPane
7) The title of the tab is specified using the _____ method.
Answer:
addtab
8) Suppose ArrayList cities contain the two strings {“Chicago”, “Miami”}. Which of the following methods will cause the list to become {“Chicago”, “Houston”,“Miami”}?
Answer:
cities.add(0, “Houston”)
9)All objects have a _____ method, which returns a String representation of the object.
Answer:
toString
Explanation:
All objects in Java have a special method named toString that returns a String representation of the object's contents.
10)If your GUI has multiple tabs and you want to know the index of the tab currently selected, use the method
Answer: getSelectedIndex
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.