This was a programming oversight on my part,
JFrame frame = world.getFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);