I’m trying to get the mouse move event from external applet that has been called like this:
Applet loader = (Applet) new URLClassLoader(
new URL[] { new File(System.getProperty("java.io.tmpdir") + "aoo.jar").toURL() }).loadClass("class").newInstance();
loader.setStub(this);
loader.init();
loader.addMouseMotionListener(a);
loader.setMaximumSize(new Dimension(788, 560));
loader.setMinimumSize(new Dimension(788, 560));
But for some reason the mouse event listener doesnt work.
Is there any way to capture the mouse move event from the external animated applet?
getContentPane().removeAll();
getContentPane().add(loader, BorderLayout.CENTER);
getContentPane().add(jt, BorderLayout.SOUTH);
This is my jframe content pane is it helps.
Thank you
Generally events in AWT don’t bubble up. (In fact mouse events have a bizarre behaviour where they do bubble up iff there are no mouse listeners on the child component.) Generally the way to hack this sort of thing is with a “glass pane” (google it), or you can use an
AWTEventListeneron theToolkit.