Java小程序为Cmd + Shift的Mac OSX [英] java applet cmd+shift mac osx

查看:110
本文介绍了Java小程序为Cmd + Shift的Mac OSX的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Mac OSX上,如果你在浏览器中运行Java小程序,它可以通过pressing <大骨节病> CMD + <大骨节病>移动弹出小程序出了浏览器。这实际上是当你想拖放您的小程序里面的东西给一个解决方法 - 在浏览器中的applet拖放是在Mac OSX上打破。

On mac osx, if you run a java applet in the browser, It's possible to pop the applet out of the browser by pressing cmd+shift. This is actually a workaround given for when you want to drag and drop something inside your applet - the drag and drop in an applet inside the browser is broken on mac osx.

所以我的问题是,有什么办法,我可以检查applet是从使用Java的浏览器?你们有什么想法?

So my question is, there is any way I can check if the applet is out of the browser using Java? Any of you have any idea?

编辑:
这个<大骨节病> CMD + <大骨节病>移动功能分离出来框架的浏览器是在JRE 7,以及拖断落。

This cmd+shift functionality to detach the frame out of the browser is broken on JRE 7 as well as the drag and drop.

推荐答案

打开我的评论到答案。

您可以尝试,无论是通过迭代的父链接的自己或使用<一个href=\"http://docs.oracle.com/javase/7/docs/api/javax/swing/SwingUtilities.html#getRoot%28java.awt.Component%29\"相对=nofollow> SwingUtilities.getRoot 或<一个href=\"http://docs.oracle.com/javase/7/docs/api/javax/swing/SwingUtilities.html#getWindowAncestor%28java.awt.Component%29\"相对=nofollow> SwingUtilities.getWindowAncestor 。随着一点点运气,那个窗口,或者它的一些其他财产的类名,会给你你可以使用的指示。

You could try to locate the root window containing the applet, either by iterating over parent links yourself or using SwingUtilities.getRoot or SwingUtilities.getWindowAncestor. With a bit of luck, the class name of that window, or some other property of it, will give you an indication you can use.

这篇关于Java小程序为Cmd + Shift的Mac OSX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆