application to applet,
February 28, 2009 at 8:53 PM
Hi! I am trying to convert an application program to an applet and it keeps giving me errors. Can someone look at it and let me know what the problem is? thanks. heres' my source code:
public void init() { // Create the Title for the Window //setTitle("Loan Payment");
// Set the Size of the Window //setSize(300,300);
//Get the container Container c = getContentPane();
// Set the Layout c.setLayout(null);
// Create, Size, and Locate Labels and Text Fields amount = new JLabel("Loan Amount"); amount.setSize(140,30); amount.setLocation(10, 10); amountTF = new JTextField(10); amountTF.setSize(100,30); amountTF.setLocation(150,10);
interest = new JLabel("Yearly Interest Rate"); interest.setSize(140,30); interest.setLocation(10,50); interestTF = new JTextField(10); interestTF.setSize(100,30); interestTF.setLocation(150, 50);
months = new JLabel("Number of Loan Months"); months.setSize(140,30); months.setLocation(10, 90); monthsTF = new JTextField(10); monthsTF.setSize(100,30); monthsTF.setLocation(150,90);
payment = new JLabel("Amount of Payment"); payment.setSize(140,30); payment.setLocation(10, 170); paymentTF = new JTextField(10); paymentTF.setSize(100,30); paymentTF.setLocation(150,170);
total = new JLabel("Total Payments"); total.setSize(100,30); total.setLocation(10, 210); totalTF = new JTextField(10); totalTF.setSize(100,30); totalTF.setLocation(150,210);