将标题设置为JFrame [英] set title to JFrame
本文介绍了将标题设置为JFrame的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
super(Some Title);
现在,当我运行MyClassExp,即使在创建JFrame之后:
新的JFrame(新标题);
我仍然拥有相同的标题,即某些标题。有没有办法解决这个问题?我尝试了很多东西来解决它,但是失败了:'(
解决方案
使用API方法 public void setTitle(String title)
。
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 TabbedFrame. TabbedFrame also extends a class DemoFrame . In DemoFrame, I have the title of the page set using keyword 'super' like:
super("Some Title");
Now when I run my MyClassExp, even after creating a JFrame as:
new JFrame("New Title");
I'm still getting the same title i.e Some Title. Is there any way to solve this problem? I've tried a lot to solve it but failed :'(
解决方案
Use the API method public void setTitle(String title)
.
这篇关于将标题设置为JFrame的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文