public void dispose() {
	for (int i = 0; i < resources.size(); i++) {
		Object obj = resources.get(i);
		if (obj != null && obj instanceof Resource) 
			((Resource) obj).dispose();
	}
	resources = new ArrayList();
	
	if (menu1 != null) {
		menu1.dispose();
		menu1 = null;
	}
	if (menu2 != null) {
		menu2.dispose();
		menu2 = null;
	}
}