BigDaddy has the right idea here: break the problem down. I too was trying to solve this problem and this is sadly the first link in google but it provides no answers. Here's what you need to look up in order to understand it: Events, Event Handler, Random number generation, Button creation, location setting, MouseListener.
For everyone else who googles the random jumping button code I present it here:
Leave a comment: