Re: Oh where did my MouseEvents go?

The DisplayListener did the trick.


On Dec 22, 2004, at 4:23 AM, Bill Hibbard wrote:

Hi Bruce,

You can access many of the MouseEvents by adding a
visad.DisplayListener to your DisplayImplJ3D. See
visad.DisplayEvent for a list of event types.

Good luck,

On Tue, 21 Dec 2004, Bruce Flynn wrote:

I am trying to intercept MouseEvents from a JFrame containing a VisAD
graph by registering a MouseListener on the glass pane. The problem is
that I can't seem to get the glass pane to intercept the events with a
VisAD graph in the frame.  It does however work with other components.
After doing some investigating, using the example P2_01 code provided
by Ugo Taddei, it seems to only seems to malfunction with the
DisplayImplJ3D, which is what I'm using.  I can get the MouseEvents by
adding the below code, but not when I change the display to

     jframe.getGlassPane().addMouseListener( new MouseAdapter(){
         public void mouseClicked( MouseEvent evt ){
             System.out.println("MOUSE CLICKED");

Any idea how to get MouseEvents using DisplayImplJ3D?

I included both sources with containing the 3D display