如何在 Java SE 平台上设置窗口标题?
我希望我的程序更改其窗口的标题以响应各种用户操作。 Java SE 平台是否提供了一种可移植的方式来在运行时更改主窗口的标题,或者我是否必须求助于本机 API JNI 调用?
I want my program to change its window's caption in response to various user actions. Does the Java SE platform offer a portable way to change the main window's caption at runtime, or do I have to resort to native API JNI calls?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你的意思是
setTitle
?You mean
setTitle
?JFrame 有一个 setTitle() 方法,可以设置窗口的标题。
JFrame has a setTitle() method which will set the title of the window.