68.9k views
4 votes
The title of a JFrame can be set by using which statement in the constructor of your class that extends JFrame?

super(“Title here”);
setFrameTitle(“Title here”);
setTitleFrame(“Title here”);
JFrame.super(“Title here”);

User Leze
by
5.1k points

1 Answer

5 votes

Answer:

super("Title here");

Step-by-step explanation:

JFrame is a Java swing class for displaying Frames in Graphical User Interface. The title of a JFrame can be set by calling super("Title here"); as the first statement in the constructor of your class that extends JFrame. This causes the constructor of the parent JFrame class to be called with the specified String argument and this String is then set as the title for the GUI frame.

User Mysomic
by
4.9k points