Services
Discover
Ask a Question
Log in
Sign up
Filters
Done
Question type:
Essay
Multiple Choice
Short Answer
True False
Matching
Topic
Computing
Study Set
Starting Out with Java
Exam 13: Advanced GUI Applications
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Practice Exam
Learn
Question 41
Multiple Choice
The default selection mode for a JList component is:
Question 42
Multiple Choice
What will be the results of executing the following code, if the user simply clicks OK? JPanel panel = new JPanel() ; Color selectedColor; SelectedColor = JColorChooser.showDialog(null, "Select color", Color.blue) ; Panel.setForeground(selectedColor) ;
Question 43
True/False
When a JList component is added to a JScrollPane object, a border will automatically appear around the list.
Question 44
True/False
You can create a label with an image, or with both an image and text.
Question 45
Multiple Choice
What will display when the following code is executed? JButton button = New JButton ("It is a beautiful day.") ; Button.setIcon(SunnyFace.gif) ;
Question 46
Multiple Choice
If the letter chosen as the mnemonic is in the component's text, the first occurrence of that letter will appear ________ when the component is displayed.
Question 47
True/False
Both AWT classes and Swing classes ultimately inherit from the Component class.
Question 48
Multiple Choice
The getSelectedIndex method returns:
Question 49
Multiple Choice
Images may be displayed in labels and:
Question 50
True/False
By default the scroll bars are always displayed in a JList component.
Question 51
Multiple Choice
To add the JList object addressList to a scroll pane named scrollPane, use the following:
Question 52
Multiple Choice
Which of the following statements creates a horizontal slider component with a minimum value of 0, a maximum value of 50, and an initial value of 25?
Question 53
Multiple Choice
If addressList exists and has values stored in it and addrList is an array with values stored in it, what will be the results when the following code is executed? AddressList.setListData(addrList) ;
Question 54
Multiple Choice
If the combo box addressBox contains a list of strings, why is the returned value of getSelectedItem method in the following code cast to String? String selectedAddress; SelectedAddress = (String) addressBox.getSelectedItem() ;