This window I am creating in refusing to close I created a class called Box which extends Frame and uses another class I made called Controller as its listener for both the buttons in the panel and window buttons on top. But buttons work fine but not the X button. I've tried both w.dispose() and System.exit(0) both neither work. Chances are this could be another Vista problem, could any none-Vistas test it for me please. Or simply tell me what's wrong with the code if that's the case.