@Override
    public void close() {
        if (window != null) {
            window.setVisible(false);
            window.dispose();
        } else {
            throw new UnsupportedOperationException("Nothing to close");
        }

    }