public static String format(double value, int decimal){
		
		String pattern = "0";
		switch (decimal){
			case 0: pattern = "0";
			break;
			case 1: pattern = "0.0";
			break;
			case 2: pattern = "0.00";
			break;
			case 3: pattern = "0.000";
			break;
			
		}
		df.applyPattern(pattern);
		return df.format(value);		
	}