public void renumber() {
		boolean[] used = new boolean[Settings.num_districts];
		for( int i = 0; i < used.length; i++) {
			used[i] = false;
		}
		int[] renumbering = new int[Settings.num_districts];
		for( int i = 0; i < renumbering.length; i++) {
			String s = JOptionPane.showInputDialog("Enter new district number for district "+i+" (0-"+(Settings.num_districts-1)+"):");
			if( s == null) {
				return;
			}
			int newdist = Integer.parseInt(s);
			while( newdist >= used.length || newdist < 0 || used[newdist]) {
				s = JOptionPane.showInputDialog("That number has already been used or is out of range.\nEnter new district number for district "+i+" (0-"+(Settings.num_districts-1)+"):");
				if( s == null) {
					return;
				}
				newdist = Integer.parseInt(s);
			}
			used[newdist] = true;
			renumbering[i] = newdist;
 		}
		System.out.println("renumbering...");
		for( DistrictMap dm : featureCollection.ecology.population) {
			System.out.print(".");
			for( int i = 0; i < dm.vtd_districts.length; i++) {
				dm.vtd_districts[i] = renumbering[dm.vtd_districts[i]];
			}
		}
		System.out.println();
		System.out.println("renumber done.");
		mapPanel.invalidate();
		mapPanel.repaint();
	}