Why do we need to extend the JFrame
class when building a Swing application. As far as I know extends
is used for inheriting the base class. None o
To use JFrame
in your application You can extend it as you did it in your code or make an object
as
JFrame frame= new JFrame();
and then you can do it
frame.setTitle("Title");
frame.setLayout(layout);
do it in either way as you are easy but to use JFrame in Application and to access its methods etc you have to use one of these methods