import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

public class SavingsCDApplet extends JApplet implements ActionListener
{
	JLabel caption = new JLabel("Bryson's Bank Software v 1.0\n");
	JLabel balLabel = new JLabel("Initial Balance:");
	JTextField balField = new JTextField("0", 5);
	JButton balButton = new JButton("Open Account");
	FlowLayout flow = new FlowLayout();

	JLabel readout = new JLabel("");

	public void init()
	{
		Container con = getContentPane();
		con.setLayout(flow);
		con.add(caption);
		con.add(balLabel);
		con.add(balField);
		con.add(balButton);
		balButton.addActionListener(this);

		con.add(readout);

	}

	public void actionPerformed(ActionEvent event)
	{
		Object source = event.getSource();

		if (source == balButton)
		{
			// Call the constructor for SavingsCD

			// STUB:
			readout.setText(" Your Balance is: $" +
				balField.getText());

		}

	}


}