private boolean promptSaveState() {
        DisplayState state = this.constructDisplayState();
        if(state.equals(study.getDisplayState()))
            // Don't warn if nothing to save.
            return true;

        //Custom button text
        Object[] options = {"Yes",
                            "No",
                            "Cancel"};
        int n = JOptionPane.showOptionDialog(this,
            "Save Display State?",
            "MedImage",
            JOptionPane.YES_NO_CANCEL_OPTION,
            JOptionPane.QUESTION_MESSAGE,
            null,
            options,
            options[2]);

        if(n == 0) { // "Yes", save display state
            study.saveDisplayState(state);
        }
        
        // If user clicked yes or no, follow through with action. Otherwise, if
        // user clicked cancel or closed dialog, cancel action.
        return n != 2 && n != JOptionPane.CLOSED_OPTION;
    }