Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Question 1 (5 points) Which of these is true about inner classes as listeners? O

ID: 3914443 • Letter: Q

Question

Question 1 (5 points) Which of these is true about inner classes as listeners? O a) They simplify the number of conditions a listener has to check to determine the event source O b) They are more efficient than other types of listeners O c) They cut back on the number of objects that you have to create in your program O d) They reduce the number of methods that need to be written to handle an event Save Question 2 (5 points) Which of these is used to get simple text inputs from a user? O a) JTextInput O b) JTextArea O c) JTextfField O d) JTextPane Save

Explanation / Answer

Ques 1. Answer ; (a)

With using an inner class as a listener is tht the number of checks like if condition checks which could make the coding smoother.

Ques 2. Answer : JTextField

JTextField is a GUI component in Java which helps us to enter input of one line. This helps us to get simple text input.

JTextArea is an area with more than 1 lines where we can enter our data. But since, the program asked for simple text, we would prefer JTextArea.

JTextInput is not a component in Java.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote