Login  Register

How do I attach a mouselistener to a ResultsTable?

Posted by Nico Stuurman-4 on Sep 10, 2010; 4:02pm
URL: http://imagej.273.s1.nabble.com/How-do-I-attach-a-mouselistener-to-a-ResultsTable-tp3686988.html

Linking quantitative results (shown to the user in a ResultsTable) to  
the original Roi in the image is a very powerful tool.  I now got that  
working by attaching a KeyListener to the TextPanel in the  
ResultsTable.  The user can then select a row, type a key and is shown  
the corresponding Roi in the image.  However, it would be much nicer  
if the user could double click on a row in the ResultsTable to achieve  
the same effect.  The TextPanel class has an "addKeyListener"  
function, but not an "addMouseListener" function.  I guess that I  
could extend ResultsTable, TextWindow, and TextPanel to achieve what I  
like, but that seems overly complex.  Is there an easier solution?

Thanks!

Nico