package SI;
import java.awt.*;
import java.awt.event.*;
import java.lang.*;
import java.math.*;
import java.math.BigDecimal;
import static oracle.jrockit.jfr.events.Bits.doubleValue;
import static oracle.jrockit.jfr.events.Bits.floatValue;
import static oracle.jrockit.jfr.events.Bits.intValue;
public class SI extends Frame implements ActionListener{
TextField ptf,rtf,ttf,sitf,atf,citf,atf1;
Button ab,sib,cib,ab1;
Label pl,rl,tl,sil,al,cil,al1;
SI(){
pl=new Label("Principal:");
pl.setBounds(15,50,50,20);
ptf=new TextField();
ptf.setBounds(150, 50, 150, 20);
rl=new Label("Rate:");
rl.setBounds(15,100,50,20);
rtf=new TextField();
rtf.setBounds(150, 100, 150, 20);
tl=new Label("Time:");
tl.setBounds(15,150,50,20);
ttf=new TextField();
ttf.setBounds(150, 150, 150, 20);
sil=new Label("Simple Interest:");
sil.setBounds(15,200,150,20);
sitf=new TextField();
sitf.setBounds(150, 200, 150, 20);
sitf.setEditable(false);
sib=new Button("Simple Interest");
sib.setBounds(120,400,100,50);
sib.addActionListener(this);
cil=new Label("Compound Interest:");
cil.setBounds(15,250,200,20);
citf=new TextField();
citf.setBounds(150, 250, 150, 20);
citf.setEditable(false);
cib=new Button("Compound Interest");
cib.setBounds(240,400,130,50);
cib.addActionListener(this);
这个小程序不工作。当我单击按钮时,它会引发错误。在我将所有 double 更改为 BigDecimal 后,此错误开始。请帮帮我。我被困在这里很多天了。这里有什么错误。我对 BigDecimal 不太了解。我是新手。请帮帮我。为什么会抛出错误?
相关分类