private void generatePassword() {
		int l = ((Integer) length.getValue()).intValue();
		StringBuilder sb = new StringBuilder(l);
		Random gen = new Random((new Random((new Random((new Random()).nextInt())).nextInt())).nextInt());
		for (int i = 0; i < l; i++) {
			char c = (char)(97 + gen.nextInt(26));
			sb.insert(i, c);
		}
		if (usePunct)
			for (int i = 0; i < l / 2; i++) {
			  int place = gen.nextInt(l);
			  char c = (char)(33 + gen.nextInt(15));
			  sb.deleteCharAt(place);
			  sb.insert(place, c);
			}
		if (useUppercase)
			for (int i = 0; i < l / 2; i++) {
			  int place = gen.nextInt(l);
			  char c = (char)(65 + gen.nextInt(26));
			  sb.deleteCharAt(place);
			  sb.insert(place, c);
			}
		if (useDigits)
			for (int i = 0; i < l / 2; i++) {
			  int place = gen.nextInt(l);
			  char c = (char)(48 + gen.nextInt(10));
			  sb.deleteCharAt(place);
			  sb.insert(place, c);
			}
		gp.setText(sb.toString());
		password = sb.toString();
	}