After you close() the object, try putting in a pause() for a brief period of time. But first have it disp() a message saying that you got there -- it is possible that the callback is not getting serviced until later.
If that does not work, you might need to start a timer that does the close(). This would have to do with the fact that timers can interrupt at every line of a .m but graphic callback events can only interrupt when a pause() or drawnow() is done or a figure() is raised.
It would not surprise me if the real work is being done in Java and so cannot be manipulated by MATLAB directly.