Asked by Vaishnavi Surnis on May 12, 2024

verifed

Verified

To create a window, which of the following classes has to be extended?

A) Container
B) JFrame
C) JButton
D) JTextField

Extended

In programming and software, refers to classes or interfaces that have been expanded or enhanced through inheritance or addition of new features.

Container

An object used in programming to store and organize various objects or data types, often providing mechanisms for adding, modifying, and retrieving contents.

JFrame

A class in Java used to create a window on which components like buttons, labels, text fields can be added.

  • Comprehend and implement the strategies for developing a window in Java applications.
verifed

Verified Answer

LS
Linda StokesMay 17, 2024
Final Answer :
B
Explanation :
To create a window, the JFrame class should be extended since it provides the basic window components, such as title bar, minimize/maximize/close buttons, and borders. The Container class is used to hold and organize other components, while JButton and JTextField are used for creating interactive elements within the window.