Place all your objects into a linked list when you create them.
whenever you click on an object, move it to the end of the linked list.
when drawing all your objects, loop through the list from front to back ensuring that the picked image gets drawn last.
whenever you click on an object, move it to the end of the linked list.
when drawing all your objects, loop through the list from front to back ensuring that the picked image gets drawn last.