how to get focus to an internal frame in html page
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) {}
}
精彩评论