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.
当我们在浏览器上显示我们的小程序并且小程序启动焦点自动转到浏览器箭头键时,如何将焦点集中到 jframe 内的内部 jframe 上做页面向上和向下没有我添加到我的帧侦听器的特定顺序?
试试这个代码:
protected void createFrame() { MyInternalFrame frame = new MyInternalFrame(); frame.setVisible(true); desktop.add(frame); try { frame.setSelected(true); } catch (java.beans.PropertyVetoException e) {} }