That looks good. The repaint() and show() shouldn't be necessary though.

Do you see the current image number changing?

Cheers,
_