public static void deleteAccounts(List<Account> accountList, Accounts accounts){
        if(!accountList.isEmpty()) {
            ArrayList<String> failed = new ArrayList<String>();
            for(Account account : accountList) {
                try{
                    accounts.removeBusinessObject(account);
                }catch (NotEmptyException e){
                    failed.add(account.getName());
                }
            }
            if (failed.size() > 0) {
                if (failed.size() == 1) {
                    ActionUtils.showErrorMessage(ActionUtils.ACCOUNT_NOT_EMPTY, failed.get(0));
                } else {
                    StringBuilder builder = new StringBuilder(getBundle("BusinessActions").getString("MULTIPLE_ACCOUNTS_NOT_EMPTY")+"\n");
                    for(String s : failed){
                        builder.append("- ").append(s).append("\n");
                    }
                    JOptionPane.showMessageDialog(null, builder.toString());
                }
            }
        }
        ////ComponentMap.refreshAllFrames();
    }