Presumably you're doing something like:

      clz = (*env)->FindClass(env, "java/awt/MouseEvent");
      ctor = (*env)->GetMethodID(env, clz, "<init>",
"(Ljava/lang/Component;IJIIIIZI)V");
      obj = (*env)->NewObject(env, clz, ctor, PARM1, PARM2...
...

What are you passing as PARM1 to the MouseEvent constructor?  If I read the
1.4.1 code correctly, this "source object" parameter should eventually get
stored in the protected transient "source" field of EventObject, and should
therefore be accessible to Java via getSource().

Is what you're putting there a reference to a Component (or some subclass
of Component)?

On Thursday, 01/30/2003 at 11:20 CET, "Tomas Bonilla Rau"
<[EMAIL PROTECTED]> wrote:
> i am having a java application going to the native  side (written in C)
to
> build an Event (lets say a  MouseEvent(source,id,....)).�The thread goes
to the
> java side,puts the  event in a queue and then back to native�to wait for
more
> Events. The  constructor�for the MouseEvent is called from the native
side
> sucessfully.
> The problem:�on the java side�I�have  no access to the source of the
> MouseEvent.The  source is not null but�I can not get the class or even
call any
> of its  methods. The Thread runs stand alone,�� the source is saved as
global
> on a buffer�at the native side and there is a reference to the source on
the
> java side as well.
> Could please  anyone tell if�I am missing  something related to JNI so
that i
> can not access the source at the java  side.?

-blair

Blair Wyman -- iSeries JVM -- (507) 253-2891
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"It is a sobering thought that when Mozart was my age,
he had been dead for two years." -- Tom Lehrer




____________________________________________________
To change your JDJList options, please visit:
http://www.sys-con.com/java/list.cfm

Be respectful! Clean up your posts before replying
____________________________________________________

Reply via email to