NPTEL Programming In Java Week 9 Assignment Answers 2025
1. Which Swing component is best suited for displaying a drop-down list of selectable options?
a. JButton
b. JComboBox
c. JTextField
d. JPanel
Answer :- For Answers Click Here
2.

Answer :-
3. Which of the following is true about the JLabel component in Java Swing?
a. It is used only for displaying text.
b. It can display text and icons.
c. It cannot be added to a JPanel.
d. It generates mouse events by default.
Answer :-
4. Which method is used to handle mouse click events in Java Swing?
a. mouseClicked)
b. keyPressed()
c. actionPerformed()
d. componentShown()
Answer :-
5.

Answer :- For Answers Click Here
6.

Answer :-
7.

Answer :-
8.

Answer :-
9.

Answer :-
10.

Answer :- For Answers Click Here