提交 edb22b63 编写于 作者: A ant

6833019: KeyboardFocusManager.getCurrentKeyboardFocusManager() throws unspecified HeadlessException

Reviewed-by: art
上级 217d3f2c
......@@ -179,9 +179,15 @@ public class HeadlessToolkit extends Toolkit
throw new HeadlessException();
}
public KeyboardFocusManagerPeer createKeyboardFocusManagerPeer(KeyboardFocusManager manager)
throws HeadlessException {
throw new HeadlessException();
public KeyboardFocusManagerPeer createKeyboardFocusManagerPeer(KeyboardFocusManager manager) {
// See 6833019.
return
new KeyboardFocusManagerPeer() {
public Window getCurrentFocusedWindow() { return null; }
public void setCurrentFocusOwner(Component comp) {}
public Component getCurrentFocusOwner() { return null; }
public void clearGlobalFocusOwner(Window activeWindow) {}
};
}
public TrayIconPeer createTrayIcon(TrayIcon target)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册