Is LoginInterface a JFrame (or extending from JFrame)? If so, you can set the default close operation?