Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我希望我的程序更改其窗口的标题以响应各种用户操作。Java SE 平台是否提供了一种可移植的方式来在运行时更改主窗口的标题,还是我必须求助于本机 API JNI 调用?
你的意思是setTitle?
setTitle
JFrame 有一个 setTitle() 方法,它将设置窗口的标题。