setVisible(false)
// or
dispose()


Your "process" (whatever that might refer to) probably shouldn't be running on the EDT in that case.

To get better help sooner, post a SSCCE
link -->...