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.
现在,我有这样的框架设置
[]Form MainApplet | ----[]Other Components | | | +--jFrame2 | + -- jFrame
加载时它运行 [JFrame1],底部的那个,我希望它然后更改为 jFrame2?我怎样才能做到这一点?我尝试了各种代码,示例会有所帮助!谢谢,
据我所知,您打开了多个框架,您只想更改焦点。jFrame2.requestFocus()如果您希望您的第二个 JFrame 成为选定的,这很容易实现。
jFrame2.requestFocus()