set title to JFrame

前端 未结 3 616
一生所求
一生所求 2021-01-14 02:47

I am new to Java. My problem is that I have a class names MyClassExp. I have extended it from JFrame. Inside the class, I initiate an object of another class named TabbedFra

相关标签:
3条回答
  • 2021-01-14 03:25

    Use the API method public void setTitle(String title).

    0 讨论(0)
  • 2021-01-14 03:27

    Just use setTitle("yourTitleName");

    for example:

    setTitle("Currency Converter");
    textField.addKeyListener(this);
    combo.addItemListener(this);
    label.addMouseListener(this);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    
    0 讨论(0)
  • 2021-01-14 03:44

    - Inside the MyClassExp class's constructor use this.setTitle(String title) method.

    0 讨论(0)
提交回复
热议问题