Applets
Develop and test
Code
The code for the Future Value Calculator applet
import java.awt.*;
import javax.swing.*;
public class FutureValueApplet extends JApplet
{
public void init()
{
JPanel panel = new FutureValuePanel();
this.add(panel);
}
}
How to modify the code for the FutureValuePanel class so it can be used with an applet
public class FutureValuePanel extends JPanel implements ActionListener
{
// the declarations should not include an Exit button
public FutureValuePanel()
{
// the constructor should not create an Exit button
}
public void actionPerformed(ActionEvent e)
{
// the ActionListener should not respond to the
// Exit button
}
}