posted 15 years ago
That last part is going to be a problem, since your Swing application knows nothing about how it was started, and therefore does not know about the IE window. And closing just any IE window will not do; even if there is just one active window, there is no guarantee that that is the window that opened your app - the user could have closed it manually and opened another window. Or he could have used that window to open a different page.
Note that if your Swing application is in fact a JApplet, then you can do what you want. Use getAppletContext().showDocument(...) to do just that.