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.
当嵌入式 Java 小程序因为浏览器移动而改变位置时,是否可以获得事件?
明显的方法不起作用:
applet.addComponentListener(new ComponentListener() { public void componentMoved(ComponentEvent e) { System.out.println("componentMoved"); } // snip });
循环调用getLocationOnScreen()小程序中的任何固定元素。请注意,滚动包含小程序的页面时也会触发。
getLocationOnScreen()