@SuppressWarnings("static-access")
	public boolean approveSelection(){
    	boolean seccheck = false;
        File f = listener.getJfchooser().getSelectedFile();
        if(f.exists() && listener.getJfchooser().getDialogType() == listener.getJfchooser().SAVE_DIALOG){
            int result = JOptionPane.showConfirmDialog(frame,"The file already exists, overwrite?","Existing file",JOptionPane.YES_NO_CANCEL_OPTION);
            switch(result){
                case JOptionPane.YES_OPTION:
                	listener.getJfchooser().approveSelection();
                    seccheck = true;
                    break;
                case JOptionPane.NO_OPTION:
                	seccheck = false;
                	break;
                case JOptionPane.CLOSED_OPTION:
                	seccheck = false;
                	break;
                case JOptionPane.CANCEL_OPTION:
                	listener.getJfchooser().cancelSelection();
                	seccheck = false;
                	break;
            }
        }else{
        	seccheck = true;
        }
        return seccheck;
    }