Writing Java Application Code | Module 3
Course Name: Writing Java Application Code (Java as a Second Language Specialization)
Course Link: Writing Java Application Code
These are Writing Java Application Code Week 3 Coursera Answers
Q1. If flow layout is enabled, how are components added?
- AddBounds
- Drag and Drop
- Added starting at the top row of the container and continuing to the next rows as needed.
- By template
Answer: Added starting at the top row of the container and continuing to the next rows as needed.
Q2. Which line disables Flow Layout?
- Flow Layout = no;
- object.setLayout(null);
- object.setLayout(false);
- !object.setLayout();
Answer: object.setLayout(null);
Q3. True or False: If Flow Layout is disabled the setBounds() method can be used to locate components.
- True
- False
Answer: True
Q4. What are the 2 states of a check box?
- checked and unchecked
- on and off
- New and old
- Up and down
Answer: checked and unchecked
These are Writing Java Application Code Week 3 Coursera Answers
Q5. Checkboxes do not work independantly
- True
- False
Answer: False
Q6. In order to be most effective. radio buttons should be added to __________ .
- a Button Group
- A text string
- The JFrame
- A JPanel
Answer: The JFrame
Q7. True or False: The checked or unchecked status of a checkbox can be tested.
- True
- False
Answer: True
Q8. In a button group, how many radio buttons can be selected at a time?
- all buttons
- More than one button
- one button
- two buttons
Answer: one button
These are Writing Java Application Code Week 3 Coursera Answers
Q9. The selection items for a ComboBox are added by ___________ .
- the user adds then one at a time
- setText method
- A String array
- Free form text
Answer: A String array
Q10. JLabels can contain images. Which line below instantiates the image?
- new image=(image-file);
- ImageIcon image = new ImageIcon(“path to imagefile / image-file”);
- image = image-file
- setImage(image-file);
Answer: ImageIcon image = new ImageIcon("path to imagefile / image-file");
These are Writing Java Application Code Week 3 Coursera Answers
More Weeks of the course: Click Here
More Coursera courses: https://progiez.com/coursera