private void refreshDialog() {
		String nr = currentAccountNumber();
		accountcombo.removeAllItems();
		if (bank != null)  {
			try{
				Set<String> s = bank.getAccountNumbers();
				ArrayList<String> accnumbers = new ArrayList<String>(s);
				Collections.sort(accnumbers);
				ignoreItemChanges=true;
				for(String item : accnumbers){
					accountcombo.addItem(item);
					if(item.equals(nr)) accountcombo.setSelectedItem(item);
				}
				ignoreItemChanges=false;
				
				// clean up local accounts map
				for(String key : s){
					if(!accounts.containsKey(key)){
						accounts.put(key, bank.getAccount(key));
					}
				}
				Iterator<String> it = accounts.keySet().iterator();
				while(it.hasNext()){
					if(!s.contains(it.next())) it.remove();
				}

				int size = s.size();
				btn_deposit.setEnabled(size > 0);
				btn_withdraw.setEnabled(size > 0);
				btn_transfer.setEnabled(size > 1);
				item_close.setEnabled(size > 0);
				
				for (BankTest t : tests) {
					JMenuItem m = testMenuItems.get(t);
					m.setEnabled(t.isEnabled(size));
				}

				updateCustomerInfo();
			}
			catch(Exception e){
				error(e);
			}
		}
	}