DecimalFormat df = new DecimalFormat("0.##"); df.setMaximumFractionDigits(0); df.format(tr.getRealvalue())