How to change textures with a click

Hi! I’m developing an application with JOGL and MouseEvent and I want to know how can I change a texture with a click.
I understand well events and textures, but and don’t how to make it.
Thanks!!

In your MouseListener’s click (or similar) callback, set a state variable in your GLEventListener and force a repaint of your GLAutoDrawable. On the next call to your GLEventListener.display() method, notice that the state variable has changed and change which texture ID you bind when drawing the object.

mmm… I’m newer in JoGL world and I don’t understand. Could you a little example? Please?
Thanks a lot!

Look at the source code for the Gears demo in the jogl-demos workspace. That shows in a concise example how to feed mouse interactions (mouse drags, not clicks, though) into a GLEventListener.