I am very new to Java. I am trying to create a website but I need there to be a button which when clicked upon will pick a playing card (or any gif file) from a pack (set of gif files) randomly and display it on screen

Is this easy to do - can anyone guide me in the right direction