Dear Students, are you facing problem while solving programming in java NPTEL week 9 assignment. So, after spending my time on the assignment, I have provided answers for all 10 questions.
Programming In Java NPTEL Week 9 Assignment Answers
Q1. Which of the following Listener(s) is/are supported by button Swing component ?
a. Action Listner
b. Change Listner
c. Item Listner
d. Window Listner
Answer: Option A, B and C.
1100+ Students are taking advantage of instant notifications on telegram.
Q2. Which of the following is/are NOT interface(s) in javax.swing package?
a. MenuElement
b. BoxLayout
c. JComponent
d. Scrollable
Answer: Option B and C.
Q3. Which of the following statement(s) is/are false?
a. Swing component frame support Window Listner.
b. Swing component combo box support Window Listner.
c. Swing component check box support Window Listner.
d. Swing component dialog support Window Listner.
Answer: Option B and C.
Q4. Which package provides many event classes and Listener interfaces for event handling?
a. java.awt.activeevent
b. java.awt.event
c. java.awt.listener
d. none of these
Answer: Option B.
Q5. Select the correct information
a. JTextField cannot be used as a JLabel.
b. JLabel cannot be used as a JTextField.
c. Button grouped radio button cannot be used instead of JComboBox.
d. JPasswordField extends JLabel.
Answer: Option B.
Q6. Which of the following is/are incorrect regarding events in Java?
a. EventClass is super class of all the events.
b. AdjustmentEvent will be notified if scroll bar is manipulated.
c. All the classes and methods required for even handling in Java is in java.awt package.
d. getID() method can be used to determine the type of event.
Answer: Option A.
Q7. Which of the following is/are interface(s) of java.awt package?
a. Button
b. Choice
c. Dialog
d. Paint
Answer: Option D.
Q8. Which of the following displays components row-by-row in the order in which they were added to the JFrame?
a. CardLayout
b. FlowLayout
c. BorderLayout
d. GridLayout
Answer: Option B.
Q9. Which of the following statements are true?
a. Java AWT components are platform-dependent.
b. Java Swing componets are platform-independent.
c. MVC pattern is not supported by AWT.
d. MVC pattern is supported by Swing.
Answer: All Options A, B, C and D.
Q10. Which of the following method is used to set a frame, say f with size 300 x 200 pixels?
JFrame f = new JFrame();
a. f.setsize (300, 200);
b. f.setSize(300, 200);
c. f.paint (300, 200);
d. f.setVisible (300, 200);
Answer: Option A.
TELEGRAM FOR NOTIFICATION | Click Here |
Follow on Google News (in one click) | Click Here |
Disclaimer: These answers are provided only for the purpose to help students to take references. This website does not claim any surety of 100% correct answers. So, this website urges you to complete your assignment yourself.
Also Available: