My program shuts down properly in standalone mode, but when I run it in client or server mode the following threads keep running for a couple of minutes after the GUI disappears:
Timer-0
Java2D Disposer
AWT-Windows
DestroyJavaVM
TimerQueue
I think this is because I am using RMI. How am I supposed to shut down RMI elegantly so that the whole program exits quickly?