开发者

how to get focus to an internal frame in html page

开发者 https://www.devze.com 2023-03-18 06:15 出处:网络
How to get focus to a internal jframe inside a jframe when w开发者_如何学Ce show our applet on browser and applet start focus automatically go to browser arrow keys do page up and down no my specifiec

How to get focus to a internal jframe inside a jframe when w开发者_如何学Ce show our applet on browser and applet start focus automatically go to browser arrow keys do page up and down no my specifiec order that i add to my frame listener?


Try this code:

protected void createFrame() {

    MyInternalFrame frame = new MyInternalFrame();
    frame.setVisible(true);
    desktop.add(frame);
    try {
        frame.setSelected(true);
    } catch (java.beans.PropertyVetoException e) {}
}
0

精彩评论

暂无评论...
验证码 换一张
取 消