NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
The DisplayListener did the trick. Thanks, Bruce 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, Bill On Tue, 21 Dec 2004, Bruce Flynn wrote:I am trying to intercept MouseEvents from a JFrame containing a VisADgraph by registering a MouseListener on the glass pane. The problem isthat 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 DisplayImplJ3D. jframe.getGlassPane().addMouseListener( new MouseAdapter(){ public void mouseClicked( MouseEvent evt ){ System.out.println("MOUSE CLICKED"); } }); jframe.getGlassPane().setVisible(true); Any idea how to get MouseEvents using DisplayImplJ3D? I included both sources with P2_01.java containing the 3D display Thanks Bruce
visad
archives: