Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2005

Tip: Looking for answers? Try searching our database.

AWT Native Interface

Thread view: 
christian.bourque@gmail.com - 13 Jul 2005 14:51 GMT
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
Roedy Green - 14 Jul 2005 02:59 GMT
>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.

Signature

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

Mr.C - 14 Jul 2005 15:09 GMT
Thanks!

Christian


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.