AWT Native Interface

C

christian.bourque

Hi!

I'm working on a Java graphical frontend for a native X11 application
and I'm trying to embed the native application window inside a Java AWT
Canvas using the AWT Native Interface. Everything works great except
for mouse events which seems to be ignored by the native window.
Keyboard events are handled correctly though...

Is there a way to force mouse events to be passed to the native window
(I can see them from the Canvas)?

Thanks

Christian
 
R

Roedy Green

Is there a way to force mouse events to be passed to the native window
(I can see them from the Canvas)?

You will have to field events and figure out which ones are yours and
which belong to the native. Then pass on some to the native piece.

See http://mindprod.com/jgloss/event11.html

for how it all works. I have no experience with that particular
interface, but it seems logical it would work the same as any other
peer-type component.

Your Canvas is acting much like a Panel does for an embedded Canvas.

You might study Sun's code.

--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm

Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top