精选优质文档-倾情为你奉上计算器布局显示:功能举例:13+20=33-7*14=-98:先输入7,再单击-/+将其变成负数,然后依次单击号、14与7!=5040sin30=0.5:先输入30,然后按下按钮转换成角度值,再按下sin即可显示结果sqrt(4)=2:利用鼠标点击4后再点击sqrt按键即可显示结果2*=6.2832源程序如下:import java.awt.BorderLayout;import java.awt.Color;import java.awt.Dimension;import java.awt.Font;import java.awt.GridLayout;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.text.DecimalFormat;import javax.swing.BorderFactory;import