Your first task: write the necessary event handling and the game-framework (counter, score etc.). Measure the time using java's System.currentTimeMillis() method (see API). Display the time elapsed and the number of remaining hits on separate JLabels.
Your second task: to make the game
more mean, surround the button with 8 buttons (GridLayout 3x3) which
the player
is NOT allowed to hit. if the center button is sufficiently small, the
game becomes really hard. If the user clicks one of the 8 bad buttons
by
accident, the following should happen:
first time and second time: the center button becomes smaller, but the
game continues.
third time: game over.
Here's the class JumpingButton, your starting point for the first task. If you create an instance of this class, a button in the center of the screen will appear. Clicking it results in nothing, since no event handling is built in. The class also has a method 'relocate()'. If you call that class, the button will be displayed at a random position on the screen.
Full credit will be given even if you do only the first task. But I hope that many students will do both tasks.