java计算器 图形用户界面 升级版v2.0 (限制位数显示+四舍五入的处理)(四)
nt)k;
len=16-s1.length()-1;
k=k*Math.pow(10,len-1);
k=Math.round(k);
k=k/Math.pow(10,len-1);
return ""+k;
}
public void setClear(){//清除
num_record=0;
operator=0;
count_point=0;
str="";
text_show.setText("");
show_str="";
text_show1.setText("");
}
public static void main(String args[]) {
new Calculator2("计算器v2.0");
}
}