I just posted this at sun's forum (response to a different problem),
so it's an easy copy/paste
<copy/paste>
if this is the part not working
public void mouseClicked ( MouseEvent e ) {
be aware that mouseClicked does not always fire.
mousePressed event fires first, then mouseReleased, then
if the coords of pressed/released match, mouseClicked fires.
so, the mouse only has to move 1 pixel up/down/left or right
between press and release and mouseClicked won't fire.
</copy/paste>
make a small sample program - frame/panel/image with some listeners
to just print something to the console and see if it works OK for
mousePressed. if OK,
you should be able to modify your actual code
to mousePressed
<EDIT>
to make it a bit easier, here's the dummy program to
test (just change the code or image file name to match)
then click anywhere on the panel or the image, and "OK" should print in the console
[ February 21, 2008: Message edited by: Michael Dunn ]