public boolean quitApp()
    {
        if(hasChanges)
        {
            int dialogResult = JOptionPane.showConfirmDialog(this, "You have unsaved changes, would you like to save these first?", "Question", JOptionPane.YES_NO_CANCEL_OPTION);
            switch(dialogResult)
            {
                case 0:
                    if(hasSavedToFile)
                        saveFile(curFile);
                    else
                        saveAs();
                    return true;
                case 1:
                    return true;
                case 2:
                    return false;
            }
        }
        return true;
    }