I don't know what you want to do, but you pass this
as argument to the Timer constructor. This means that every 2 seconds, the actionPerformed
method of this
(instance of ConcentrationGame4) will be called. And the first thing that this method does is
GameButton button = (GameButton) e.getSource();
Obviously, this will throw an exception, since the origin of the event won't be a game button, but the timer.
To understand what a Timer does and how it works, it's very simple. You just have to read its api doc : http://download.oracle.com/javase/6/docs/api/javax/swing/Timer.html. This doc will even lead you to a tutorial explaining how they work, with examples.