-1

I need to give a title for netbeans project window for showing the purpose of the window

JFrame myFrame=new JFrame(" Title "); ?

Any one to help?

2 Answers2

0

That can work too, generally the best recommended way is to use the function setTitle.

JFrame myFrame = new JFrame(); myFrame.setTitle("title here");

dryleaf
  • 415
  • 3
  • 18
0

There is an overloaded constructor for JFrame(String title) or you can use setTitle() method.

JFrame myFrame = new JFrame("your frame title");

or

JFrame myFrame = new JFrame();
myFrame.setTitle("your frame title");
rimonmostafiz
  • 1,341
  • 1
  • 15
  • 33