Prova questo che ho appena scritto e poi dimmi se ti piace. 
È pure facilmente riutilizzabile, in quanto ho definito una classe JRingerFrame che basta poi estendere per avere "di serie" il metodo ring().
codice:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class TestFrame extends JRingerFrame
{
public TestFrame ()
{
super ("Ring Frame");
setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
setSize (300, 300);
JButton button = new JButton ("RING!!");
add (button);
button.addActionListener (new ActionListener ()
{
public void actionPerformed (ActionEvent e)
{
ring (2.0f); // circa 2 secondi
}
});
}
public static void main (String[] args)
{
SwingUtilities.invokeLater (new Runnable ()
{
public void run ()
{
TestFrame f = new TestFrame ();
f.setVisible (true);
}
});
}
}
class JRingerFrame extends JFrame
{
private Timer timer;
private int count;
private int maxCount;
private int offsetX;
private int offsetY;
public JRingerFrame (String title)
{
super (title);
timer = new Timer (50, new RingTimerActionListener ());
}
public void ring (float seconds)
{
if (!timer.isRunning ())
{
maxCount = (int) (seconds * 20);
count = 0;
timer.start ();
}
}
private class RingTimerActionListener implements ActionListener
{
public void actionPerformed (ActionEvent e)
{
Point p = getLocation ();
if (count > 0)
{
p.x -= offsetX;
p.y -= offsetY;
}
if (count++ < maxCount)
{
offsetX = (int) (Math.random () * 9) - 4; // range -4 .. +4
offsetY = (int) (Math.random () * 9) - 4; // range -4 .. +4
p.x += offsetX;
p.y += offsetY;
}
else
timer.stop ();
setLocation (p);
}
}
}