auto moving a swing window?

i was wondering if its possible to move around a swing window automatically, like for example at random times the window moves left and right on the desktop?

if possible how would this be done!!!

JFrame.setLocation(x,y) might do it?

Kev