public void actionPerformed(ActionEvent event)
{
double interest = banlance * rate;
banlance += interest;
accountpane.removeAll();
accountpane.repaint();
}
{
double interest = banlance * rate;
banlance += interest;
accountpane.removeAll();
accountpane.repaint();
}
{
super.paintComponents(g);
double testbanlance = account.getBanlance();
g.drawString(" is "+testbanlance, 20, 45);
}
-->//你要注意paintComponent方法与paint方法不同的地方就是重画时是否清除原来所画的东西
public void paint(Graphics g)
{
super.paint(g);
double testbanlance = account.getBanlance();
g.drawString(" is "+testbanlance, 20, 45); }
---------------------------
namowen(寒号不已)
的方案可行!结贴