This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
Whether it is called in Java 1.5 or 1.6, your code is faulty as you're calling Thread.sleep(...) on the EDT, so it's likely to freeze your app. Why do this rather than use something better like a Swing Timer?