Need help pulling data from an outside file into my array.  Please help  =)

Hi,
I need help adapting my array to read the interest rates from an outside file. Here is my code and the outside file I wrote. Please help. Oh, the array in question is on line 259, inside of my calculation() method.
Thanks...
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
import java.text.NumberFormat;
import java.text.DecimalFormat;
import java.io.*;
import javax.swing.JOptionPane;
public class Workshop5 extends JFrame implements ActionListener
     //declare gui components
     //declare labels
     JPanel contentPane = new JPanel();
     JPanel graphPane = new JPanel();
    JLabel instructionLabel = new JLabel();
    JLabel amountLabel = new JLabel();
     JLabel orLabel = new JLabel();
     JLabel comboBoxLabel = new JLabel();
     JLabel termLabel = new JLabel();
     JLabel rateLabel = new JLabel();
     JLabel calcLabel = new JLabel();
     JLabel paymentLabel = new JLabel();
     JLabel tableLabel = new JLabel();
     //declare font object
     Font labelFont = new Font("Tahoma", Font.PLAIN, 16);
     //declare text fields
     JTextField amountField = new JTextField(20);    
     JTextField termField = new JTextField(20);     
     JTextField rateField = new JTextField(20);
     JTextField paymentField= new JTextField(20);
     //declare combo box for loan selection
     JComboBox comboBox = new JComboBox();
    //declare button group and radio buttons
    ButtonGroup buttonGroup = new ButtonGroup();
    JRadioButton enterRadioButton = new JRadioButton("Enter amount, term, & rate", true);
    JRadioButton selectRadioButton = new JRadioButton("Select a preset term/rate loan", false);
     //declare button objects
     JButton clearButton = new JButton();
    JButton calcButton = new JButton();
    JButton quitButton = new JButton();
     //declare text area for amortization
     JTextArea amortTextArea = new JTextArea();
     JTextArea testTextArea = new JTextArea();
     //declare scroll bar for amortization table
     JScrollPane scrollPane = new JScrollPane(amortTextArea,ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
     public Workshop5()
          instructionLabel.setText("Choose one of the following payment calculation options:");
          instructionLabel.setFont(new Font("Tahoma",Font.PLAIN,16));
          //adds both buttons to button group     
          buttonGroup.add(enterRadioButton);
          buttonGroup.add(selectRadioButton);
          enterRadioButton.setFont(labelFont);
          enterRadioButton.setBackground(Color.WHITE);
          enterRadioButton.setContentAreaFilled(false);
         enterRadioButton.addActionListener(this); //adds action listener to enter radio button
          orLabel.setText("OR");
          orLabel.setFont(new Font("Tahoma",Font.BOLD,18));
          selectRadioButton.setFont(labelFont);
          selectRadioButton.setBackground(Color.WHITE);
          selectRadioButton.setContentAreaFilled(false);
          selectRadioButton.addActionListener(this); //adds action listener to select radio button
          amountLabel.setText("Enter mortgage amount");
          amountLabel.setFont(new Font("Tahoma", Font.PLAIN,16));
          amountField.requestFocusInWindow();
          termLabel.setText("Enter term length in years:");
          termLabel.setFont(new Font("Tahoma", Font.PLAIN,14));
          rateLabel.setText("Enter interest rate:");
         rateLabel.setFont(new Font("Tahoma", Font.PLAIN,14));
            comboBoxLabel.setText("Select a loan:");
         comboBoxLabel.setFont(new Font("Tahoma", Font.PLAIN,14));
         comboBox.setBackground(new Color(255,255,255));
         comboBox.setFont(new Font("Tahoma", Font.PLAIN, 14));
         comboBox.setEnabled(false);
         ComboBox();
          calcLabel.setText("Press Calculate button to determine monthly payment.");
         calcLabel.setFont(new Font("Tahoma", Font.PLAIN, 16));
         calcButton.setText("Calculate");                    
         calcButton.setFont(new Font("Tahoma", Font.BOLD, 14));
         calcButton.addActionListener(this);
            //define monthly payment label
         paymentLabel.setText("Monthly payment:");
         paymentLabel.setFont(new Font("Tahoma", Font.PLAIN, 16));
         //define monthly payment text field
         paymentField.setFont(new Font("Tahoma", Font.BOLD,16));
         paymentField.setBackground(new Color(255,255,255));
         paymentField.setEditable(false); 
          //define clear button
          clearButton.setText("Clear"); 
          clearButton.setFont(new Font("Tahoma", Font.BOLD,14));
          clearButton.addActionListener(this);
          //define quit button
          quitButton.setText("Quit");
          quitButton.setFont(new Font("Tahoma", Font.BOLD,14));
          quitButton.addActionListener(this);         
          tableLabel.setText("Amoritization Table");
          tableLabel.setFont(new Font("Tahoma", Font.BOLD, 16));
          graphPane.setBackground(Color.WHITE);
          //add components to content     
          getContentPane().add(contentPane);
          contentPane.setLayout(null);
          addComponent(contentPane, instructionLabel, 80,10,450,26);
          addComponent(contentPane, enterRadioButton, 30,40,220,30);
          addComponent(contentPane, orLabel, 280,40,100,30);
          addComponent(contentPane, selectRadioButton, 335,40,350,30);
          addComponent(contentPane, amountLabel, 100,80,220,26);
          addComponent(contentPane, amountField, 300,80,150,26);
          addComponent(contentPane, termLabel, 15,125,200,30);
          addComponent(contentPane, termField, 195,125,125,30);
          addComponent(contentPane, rateLabel, 62,160,200,30);
          addComponent(contentPane, rateField, 195,165,125,30);
          addComponent(contentPane, comboBoxLabel, 400,125,200,26);
          addComponent(contentPane, comboBox, 400,155,150,30);
          addComponent(contentPane, calcLabel, 100,200,400,30);
          addComponent(contentPane, calcButton, 250,240,100,30);
          addComponent(contentPane, paymentLabel, 150,285,200,30);
          addComponent(contentPane, paymentField, 300,285,100,30);
          addComponent(contentPane, clearButton, 100,330,100,30);
          addComponent(contentPane, quitButton, 400,330,100,30);
          addComponent(contentPane, tableLabel, 200,370,300,26);
          addComponent(contentPane, scrollPane, 10,400,450,360);
          addComponent(contentPane, graphPane, 475,400,305,360);
          //add window listener to close window when user presses X
          addWindowListener(new WindowAdapter()
               public void windowClosing(WindowEvent e)    
                    System.exit(0);
         pack();   
     //method to add components
     private void addComponent(Container container, Component c, int x, int y, int width, int height)
          c.setBounds(x, y, width, height);
          container.add(c);
     //action performed method
     public void actionPerformed(ActionEvent event)
          Object source = event.getSource();
          if (source == calcButton)
               Calculate();
          if (source == clearButton)
               Clear();
          if (source == quitButton)
               Exit();
          //defines active area based on user selection of mortgage calculation method
           //if user chooses to enter the mortgage manually, combo box fields are inactive
           if (source == enterRadioButton)
                comboBox.setEnabled(false);
                termField.setEnabled(true);
             termField.setEditable(true);
             rateField.setEnabled(true);
             rateField.setEditable(true);
             amountField.setText("");
               amountField.requestFocusInWindow();
               termField.setText("");
              rateField.setText("");
              paymentField.setText("");
              amortTextArea.setText("");
          //if user chooses to select from a preset mortgage, rate and term fields are inactive
          if (source == selectRadioButton)
               comboBox.setEnabled(true);
               termField.setEnabled(false);
               termField.setEditable(false);
               rateField.setEnabled(false);
               rateField.setEditable(false);
               amountField.setText("");
               amountField.requestFocusInWindow();
               termField.setText("");
               rateField.setText("");
               paymentField.setText("");
               amortTextArea.setText("");
     }//end of action performed method
     //combo box method
      public void ComboBox()
           String[] LoanArray = {" 7 years at 5.35 %", " 15 years at 5.50 %", " 30 years at 5.75 %"};
           for (int i = 0; i < LoanArray.length; i++)
                comboBox.addItem(LoanArray);
     }//end combo box method
     //calculation method
     void Calculate()
          //resets fields
          paymentField.setText("");
     amortTextArea.setText("");
          //calculation variables
     NumberFormat currency = NumberFormat.getCurrencyInstance();
          int [] termArray = {7, 15, 30};                               //array of years
               double [] yearlyInterestArray = {5.35, 5.5, 5.75};           //array of interest
               int totalMonths = 0;                                    //total months
               double Loan = 0.0;                               //amount of loan
               double MonthlyInterest = 0.0;                               //monthly interest rate
               double Payment = 0.0;                               //calculate payment
               double monthlyPayment = 0.0;                                   //calculate monthly payment
               double Interest = 0.0;                                              //variable for Interest Array input
               int Term = 0;                                              //variable for Term Array input
               double NewMonthlyInterest = 0.0;                               //new interest amount
               double NewLoan = 0.0;                               //new loan amount
               double Reduction = 0.0;                               //principle reduction
               //validate input
               try
                    Loan = Double.parseDouble(amountField.getText());
               catch (NumberFormatException e)
                    JOptionPane.showMessageDialog(null,"Invalid Entry. Please enter valid loan amount.", "Error", JOptionPane.WARNING_MESSAGE);
               //resets input fields after error message
          amountField.setText("");
          amountField.requestFocusInWindow();
               //if select button is chosen
          if (selectRadioButton.isSelected())
               int index = comboBox.getSelectedIndex();
               Term = termArray[index];
               Interest = yearlyInterestArray[index];
          //if user chooses to enter mortgage information
          else
               if (enterRadioButton.isSelected())
                    //validates input
          try
          Term = Integer.parseInt(termField.getText());
          catch (NumberFormatException e)
               JOptionPane.showMessageDialog(null,"Invalid entry. Please enter valid term length in years.", "Error",JOptionPane.WARNING_MESSAGE);
               //clears fields after error message
               termField.setText("");
               termField.requestFocusInWindow();
          try
               Interest = Double.parseDouble(rateField.getText());
          catch (NumberFormatException e)
               JOptionPane.showMessageDialog(null,"Invalid entry. Please enter valid rate (without percent symbol).","Error",JOptionPane.WARNING_MESSAGE);
          //clears fields after error message
          rateField.setText("");
                         rateField.requestFocusInWindow();
               //perform calculations
               if (Loan > 0)
                    Loan = Double.parseDouble(amountField.getText());
                    MonthlyInterest = (Interest / 12)/100;
                    totalMonths = Term * 12;
                    monthlyPayment = Loan * MonthlyInterest *(Math.pow((1 + MonthlyInterest), totalMonths)/(Math.pow((1 + MonthlyInterest), totalMonths)-1));
          paymentField.setText("" + currency.format(monthlyPayment));
                    //send information to amortization text area
               amortTextArea.append("Number\t");
               amortTextArea.append(" Amount\t");
               amortTextArea.append("Interest\t");
               amortTextArea.append("Principle\t");
               amortTextArea.append("Balance\n");
          NewLoan = Loan;
                    for (int i = 1; i <= totalMonths; i++)
                         NewMonthlyInterest = MonthlyInterest * NewLoan;
                         Reduction = monthlyPayment - NewMonthlyInterest;
                         NewLoan = NewLoan - Reduction;
                         amortTextArea.append(" " + i +"\t");
                         amortTextArea.append(" " + currency.format(monthlyPayment) + "\t");
                         amortTextArea.append(" " + currency.format(NewMonthlyInterest)+ "\t");
                         amortTextArea.append(" " + currency.format(Reduction) + "\t");
                         amortTextArea.append(" " + currency.format(NewLoan) + "\n");
                    //resets fields if loan amount is less than zero
                    if((Loan <= 0 || Term <= 0 || Interest <= 0))
                         paymentField.setText("");
                         amortTextArea.setText("");
     }//end calcualtion method
     //clear method
     void Clear()
          amountField.setText("");
          amountField.requestFocusInWindow();
          termField.setText("");
          rateField.setText("");
          paymentField.setText("");
          amortTextArea.setText("");
     }//end of clear method
     //main method
     public static void main(String args[])
          Workshop5 f = new Workshop5();
          f.setTitle("Carol's Mortgage Calculator");
          f.setBounds(200,100,800,800);
          f.setResizable(false);
          f.setVisible(true);
     }//end of main method
     //exit method
     void Exit()
          System.exit(0);
     }//end of exit method
}//program end
My data file is called: "InterestData.dat" and only contains the following text:
5.35, 5.5, 5.75

Ok, now I am getting this error message:
cannot resolve symbol method lenght()
Please help me out here, this is due tomorrow and I've been killing myself on it...
attaching program with revised code included, see beginning of calculation method line 250:
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.* ;
import java.text.NumberFormat;
import java.text.DecimalFormat;
import java.io.*;
import javax.swing.JOptionPane;
public class Workshop5 extends JFrame implements ActionListener
     //declare gui components
    //declare labels
    JPanel contentPane = new JPanel();
     JPanel graphPane = new JPanel();
     JLabel instructionLabel = new JLabel();
        JLabel amountLabel = new JLabel();
    JLabel orLabel = new JLabel();
    JLabel comboBoxLabel = new JLabel();
    JLabel termLabel = new JLabel();
    JLabel rateLabel = new JLabel();
    JLabel calcLabel = new JLabel();
    JLabel paymentLabel = new JLabel();
    JLabel tableLabel = new JLabel();
    //declare font object
    Font labelFont = new Font("Tahoma", Font.PLAIN, 16);
    //declare text fields
    JTextField amountField = new JTextField(20);
    JTextField termField = new JTextField(20);
    JTextField rateField = new JTextField(20);
    JTextField paymentField= new JTextField(20);
    //declare combo box for loan selection
    JComboBox comboBox = new JComboBox();
        //declare button group and radio buttons
        ButtonGroup buttonGroup = new ButtonGroup();
        JRadioButton enterRadioButton = new JRadioButton("Enter amount, term, & rate", true);
        JRadioButton selectRadioButton = new JRadioButton("Select a preset term/rate loan", false);
    //declare button objects
    JButton clearButton = new JButton();
        JButton calcButton = new JButton();
        JButton quitButton = new JButton();
    //declare text area for amortization
    JTextArea amortTextArea = new JTextArea();
    JTextArea testTextArea = new JTextArea();
    //declare scroll bar for amortization table
    JScrollPane scrollPane = new JScrollPane(amortTextArea, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
     public Workshop5()
         instructionLabel.setText("Choose one of the following payment calculation options:");
        instructionLabel.setFont(new Font("Tahoma",Font.PLAIN,16));
        //adds both buttons to button group
        buttonGroup.add(enterRadioButton);
        buttonGroup.add (selectRadioButton);
        enterRadioButton.setFont(labelFont);
        enterRadioButton.setBackground(Color.WHITE);
        enterRadioButton.setContentAreaFilled(false);
        enterRadioButton.addActionListener(this); //adds action listener to enter radio button
        orLabel.setText("OR");
        orLabel.setFont(new Font("Tahoma",Font.BOLD,18));
        selectRadioButton.setFont(labelFont);
        selectRadioButton.setBackground(Color.WHITE);
        selectRadioButton.setContentAreaFilled(false);
        selectRadioButton.addActionListener (this); //adds action listener to select radio button
          amountLabel.setText("Enter mortgage amount");
        amountLabel.setFont(new Font("Tahoma", Font.PLAIN,16));
        amountField.requestFocusInWindow();
        termLabel.setText("Enter term length in years:");
        termLabel.setFont(new Font("Tahoma", Font.PLAIN,14));
        rateLabel.setText("Enter interest rate:");
        rateLabel.setFont(new Font("Tahoma", Font.PLAIN,14));
        comboBoxLabel.setText("Select a loan:");
        comboBoxLabel.setFont(new Font("Tahoma", Font.PLAIN,14));
        comboBox.setBackground(new Color(255,255,255));
        comboBox.setFont(new Font("Tahoma", Font.PLAIN, 14));
        comboBox.setEnabled(false);
        ComboBox();
        calcLabel.setText("Press Calculate button to determine monthly payment.");
        calcLabel.setFont(new Font("Tahoma", Font.PLAIN, 16));
        calcButton.setText("Calculate");
        calcButton.setFont(new Font("Tahoma", Font.BOLD, 14));
        calcButton.setBackground(new Color(202,255,112));
        calcButton.addActionListener(this);
        //define monthly payment label
        paymentLabel.setText("Monthly payment:");
        paymentLabel.setFont(new Font("Tahoma", Font.PLAIN, 16));
        //define monthly payment text field
        paymentField.setFont (new Font("Tahoma", Font.BOLD,16));
        paymentField.setBackground(new Color(255,255,255));
        paymentField.setEditable(false);
          //define clear button
        clearButton.setText("Clear");
        clearButton.setFont(new Font("Tahoma", Font.BOLD,14));
        clearButton.setBackground(new Color(202,255,112));
        clearButton.addActionListener(this);
        //define quit button
        quitButton.setText("Quit");
        quitButton.setFont(new Font("Tahoma", Font.BOLD,14));
        quitButton.setBackground(new Color(202,255,112));
        quitButton.addActionListener(this);
          //define label for amortization table
        tableLabel.setText ("Amoritization Table");
          tableLabel.setFont(new Font("Tahoma", Font.BOLD, 16));
        graphPane.setBackground(Color.WHITE);
        //add components to content
        getContentPane().add(contentPane);
        contentPane.setLayout(null);
          addComponent(contentPane, instructionLabel, 80,10,450,26);
        addComponent(contentPane, enterRadioButton, 30,40,220,30);
        addComponent(contentPane, orLabel, 280,40,100,30);
        addComponent(contentPane, selectRadioButton, 335,40,350,30);
        addComponent(contentPane, amountLabel, 100,80,220,26);
        addComponent(contentPane, amountField, 300,80,150,26);
        addComponent(contentPane, termLabel, 15,125,200,30);
        addComponent(contentPane, termField, 195,125,125,30);
        addComponent(contentPane, rateLabel, 62,160,200,30);
        addComponent(contentPane, rateField, 195,165,125,30);
        addComponent(contentPane, comboBoxLabel, 400,125,200,26);
        addComponent(contentPane, comboBox, 400,155,150,30);
        addComponent(contentPane, calcLabel, 100,200,400,30);
        addComponent(contentPane, calcButton, 250,240,100,30);
        addComponent(contentPane, paymentLabel, 150,285,200,30);
        addComponent(contentPane, paymentField, 300,285,100,30);
        addComponent(contentPane, clearButton, 100,330,100,30);
        addComponent(contentPane, quitButton, 400,330,100,30);
        addComponent(contentPane, tableLabel, 200,370,300,26);
        addComponent(contentPane, scrollPane, 10,400,450,360);
        addComponent(contentPane, graphPane, 475,400,305,360);
        //add window listener to close window when user presses X
        addWindowListener(new WindowAdapter()
             public void windowClosing(WindowEvent e)
                  System.exit(0);
        pack();
       //method to add components
       private void addComponent(Container container, Component c, int x, int y, int width, int height)
               c.setBounds(x, y, width, height);
               container.add(c);
       //action performed method
       public void actionPerformed(ActionEvent event)
               Object source = event.getSource();
               if (source == calcButton)
                       Calculate();
               if (source == clearButton)
                       Clear();
               if (source == quitButton)
                       Exit();
               //defines active area based on user selection of mortgage calculation method
               //if user chooses to enter the mortgage manually, combo box fields are inactive
               if (source == enterRadioButton)
                       comboBox.setEnabled(false);
                       termField.setEnabled(true);
               termField.setEditable(true);
               rateField.setEnabled(true);
               rateField.setEditable(true);
               amountField.setText ("");
                       amountField.requestFocusInWindow();
                       termField.setText("");
                   rateField.setText("");
                   paymentField.setText ("");
                   amortTextArea.setText("");
               //if user chooses to select from a preset mortgage, rate and term fields are inactive
               if (source == selectRadioButton)
                       comboBox.setEnabled(true);
                       termField.setEnabled(false);
                       termField.setEditable(false);
                       rateField.setEnabled (false);
                       rateField.setEditable(false);
                       amountField.setText("");
                       amountField.requestFocusInWindow();
                       termField.setText ("");
                       rateField.setText("");
                       paymentField.setText("");
                       amortTextArea.setText("");
       }//end of action performed method
       //combo box method
        public void ComboBox()
               String[] LoanArray = {" 7 years at 5.35 %", " 15 years at 5.50 %", " 30 years at 5.75 %"};
               for (int i = 0; i < LoanArray.length; i++)
                       comboBox.addItem(LoanArray);
}//end combo box method
//calculation method
     void Calculate()
          //resets fields
          paymentField.setText("");
          amortTextArea.setText("");
          //calculation variables
          NumberFormat currency = NumberFormat.getCurrencyInstance();
          //declare input stream object
          InputStream istream;
          //create a file object to refer to the outside file
          File interestData = new File("InterestFile.dat");
          //assign instream to the new file object
          istream = new FileInputStream(interestData);
          try
               StringBuffer sb = new StringBuffer();
               BufferedReader in = new BufferedReader(new FileReader(interestData));
               String line = "";
               while((line = in.readLine()) != null)
                    sb.append(line);
               in.close();
               String fileData = sb.toString();
               String[] splitData = fileData.split(", ");
               double [] yearlyInterestArray = new double[splitData.length()];
               for(int j = 0; j < splitData.length(); j++)
                    yearlyInterestArray[j] = new Double(splitData[j]).doubleValue();
          catch (IOException e)
               JOptionPane.showMessageDialog(null, "File does not exist." + e.getMessage());
          int [] termArray = {7, 15, 30}; //array of years
          double [] yearlyInterestArray = { 5.35, 5.5, 5.75}; //array of interest
          int totalMonths = 0; //total months
          double Loan = 0.0; //amount of loan
          double MonthlyInterest = 0.0; //monthly interest rate
          double Payment = 0.0; //calculate payment
double monthlyPayment = 0.0; //calculate monthly payment
double Interest = 0.0; //variable for Interest Array input
int Term = 0; //variable for Term Array input
double NewMonthlyInterest = 0.0; //new interest amount
double NewLoan = 0.0; //new loan amount
double Reduction = 0.0; //principle reduction
//validate input
try
     Loan = Double.parseDouble(amountField.getText());
catch (NumberFormatException e)
     JOptionPane.showMessageDialog(null,"Invalid Entry. Please enter valid loan amount.", "Error", JOptionPane.WARNING_MESSAGE);
//resets input fields after error message
amountField.setText("");
amountField.requestFocusInWindow ();
          //if select button is chosen
          if (selectRadioButton.isSelected())
               int index = comboBox.getSelectedIndex ();
               Term = termArray[index];
               Interest = yearlyInterestArray[index];
          //if user chooses to enter mortgage information
          else
               if (enterRadioButton.isSelected())
          //validates input
          try
               Term = Integer.parseInt(termField.getText());
catch (NumberFormatException e)
     JOptionPane.showMessageDialog(null,"Invalid entry. Please enter valid term length in years.", "Error",JOptionPane.WARNING_MESSAGE);
     //clears fields after error message
     termField.setText("");
     termField.requestFocusInWindow();
try
     Interest = Double.parseDouble(rateField.getText());
catch (NumberFormatException e)
     JOptionPane.showMessageDialog(null,"Invalid entry. Please enter valid rate (without percent symbol).","Error",JOptionPane.WARNING_MESSAGE);
     //clears fields after error message
     rateField.setText("");
     rateField.requestFocusInWindow();
          //perform calculations
          if (Loan > 0)
               Loan = Double.parseDouble(amountField.getText ());
               MonthlyInterest = (Interest / 12)/100;
               totalMonths = Term * 12;
               monthlyPayment = Loan * MonthlyInterest *(Math.pow ((1 + MonthlyInterest), totalMonths)/(Math.pow((1 + MonthlyInterest), totalMonths)-1));
paymentField.setText("" + currency.format(monthlyPayment));
//send information to amortization text area
amortTextArea.append("Number\t");
amortTextArea.append(" Amount\t");
amortTextArea.append("Interest\t");
amortTextArea.append("Principle\t");
amortTextArea.append("Balance\n");
               NewLoan = Loan;
               for (int i = 1; i <= totalMonths; i++)
     NewMonthlyInterest = MonthlyInterest * NewLoan;
     Reduction = monthlyPayment - NewMonthlyInterest;
     NewLoan = NewLoan - Reduction;
     amortTextArea.append(" " + i +"\t");
     amortTextArea.append (" " + currency.format(monthlyPayment) + "\t");
     amortTextArea.append(" " + currency.format(NewMonthlyInterest)+ "\t");
     amortTextArea.append(" " + currency.format(Reduction) + "\t");
     amortTextArea.append(" " + currency.format(NewLoan) + "\n");
//resets fields if loan amount is less than zero
if((Loan <= 0 || Term <= 0 || Interest <= 0))
     paymentField.setText("");
     amortTextArea.setText("");
     }//end calcualtion method
//clear method
void Clear()
amountField.setText("");
amountField.requestFocusInWindow();
termField.setText("");
rateField.setText("");
paymentField.setText("");
amortTextArea.setText("");
}//end of clear method
//main method
public static void main(String args[])
Workshop5 f = new Workshop5();
f.setTitle("Carol's Mortgage Calculator");
f.setBounds(200,100,800,800);
f.setResizable(false);
f.setVisible(true);
}//end of main method
//exit method
void Exit()
System.exit(0);
}//end of exit method
}//program end

Similar Messages

  • Need to read data from pipe separated file using POJO?

    Hi,
    I need to read data from pipe separated file using POJO.
    There is config.properties file which consists of the
    data mapping.
    Can you help me with sample code or help?
    Regards
    Regards
    Taton
    Edited by: Taton on Mar 7, 2009 4:41 PM

    It's not possible to read from a file without using classes from the core API*. You'll have to get clarification from your instructor as to which classes are and are not allowed.
    [http://java.sun.com/docs/books/tutorial/essential/io/]
    *Unless you write a bunch of JNI code to replicate what the java.io classes are doing.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • I need to import data from a CSV file to an Oracle table

    I need to import data from a CSV file to an Oracle table. I'd prefer to use either SQL Developer or SQL Plus code.
    As an example, my target database is HH910TS2, server is ADDb0001, my dB login is em/em, the Oracle table is AE1 and the CSV file is AECSV.
    Any ideas / help ?

    And just for clarity, it's good to get your head around some basic concepts...
    user635625 wrote:
    I need to import data from a CSV file to an Oracle table. I'd prefer to use either SQL Developer or SQL Plus code.SQL Developer is a GUI front end that submits code to the database and displays the results. It does not have any code of it's own (although it may have some "commands" that are SQL Developer specific)
    SQL*Plus is another front end (character based rather than GUI) that submits code to the database and displays the results. It also does not have code of it's own although there are SQL*Plus commands for use only in the SQL*Plus environment.
    The "code" that you are referring to is either SQL or PL/SQL, so you shouldn't limit yourself to thinking it has to be for SQL Developer or SQL*Plus. There are many front end tools that can all deal with the same SQL and/or PL/SQL code. Focus on the SQL and/or PL/SQL side of your coding and don't concern yourself with limitations of what tool you are using. We often see people on here who don't recognise these differences and then ask why their code isn't working when they've put SQL*Plus commands inside their PL/SQL code. ;)

  • Need to read data from a text file

    I need to read data from a text file and create my own hash table out of it. I'm not allowed to use the built in Java class, so how would I go implementing my own reading method and hash table class?

    It's not possible to read from a file without using classes from the core API*. You'll have to get clarification from your instructor as to which classes are and are not allowed.
    [http://java.sun.com/docs/books/tutorial/essential/io/]
    *Unless you write a bunch of JNI code to replicate what the java.io classes are doing.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Adding data from a text file into a JTextArea

    I'm working on a blogging program and I need to add data from a text file named messages.txt into a JTextArea named messages. How do I go about doing this?

    then you need to be more specific in what you need help with because those are two commonly used options for reading data in from a file. what have you tried? where is your code failing? what kind of errors are you getting? of course it looks like others in the forum have already reprimanded you for failing to post properly.
    i have used both FileReader and the nio package for cfg and ini files which are both just txt files as well as massive data files. so tell me how they dont help you?

  • How do you read data from a text file into a JTextArea?

    I'm working on a blogging program and I need to add data from a text file named messages.txt into a JTextArea named messages. How do I go about doing this?

    Student_Coder wrote:
    1) Read the file messages.txt into a String
    2) Initialize messages with the String as the textSwing text components are designed to use Unix-style linefeeds (\n) as line separators. If the text file happens to use a different style, like DOS's carriage-return+linefeed (\r\n), it needs to be converted. The read() method does that, and it saves the info about the line separator style in the Document so the write() method can re-convert it.
    lethalwire wrote:
    They have 2 different ways of importing documents in this link:
    http://java.sun.com/docs/books/tutorial/uiswing/components/editorpane.html
    Neither of those methods applies to JTextAreas.

  • Uploading the data from a flat file into ztable

    Hi,
    I have a requirement where I have to upload the data from 2 flat files into 2 z tables(ZRB_HDR,ZRB_ITM).From the 1st flat file only data for few fields have to be uploaded into ztable(ZRB_HRD) .Fromthe 2nd flat file data for all the fields have to me uploaded into ztable(ZRB_ITM). How can I do this?
    Regards,
    Hema

    hi,
    declare two internal table with structur of your tables.
    your flat files should be .txt files.
    now make use of GUI_UPLOAD function module to upload your flatfile into internal tables.
    CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename            = 'c:\file1.txt'
          has_field_separator = 'X'
        TABLES
          data_tab            = itab1
        EXCEPTIONS
          OTHERS              = 1.
    use this function twice for two tables.
    then loop them individually and make use of insert command.

  • How can I import data from a csv file into databse using utl_file?

    Hi,
    I have two machines (os is windows and database is oracle 10g) that are not connected to each other and both are having the same database schema but data is all different.
    Now on one machine, I want to take dump of all the tables into csv files. e.g. if my table name is test then the exported file is test.csv and if the table name is sample then csv file name is sample.csv and so on.
    Now I want to import the data from these csv files into the tables on second machine. if I've 50 such csv files, then data should be written to 50 tables.
    I am new to this. Could anyone please let me know how can I import data back into tables. i can't use sqlloader as I've to satisfy a few conditions while loading the data into tables. I am stuck and not able to proceed.
    Please let me know how can I do this.
    Thanks,
    Shilpi

    Why you want to export into .csv file.Why not export/import? What is your oracle version?
    Read http://www.oracle-base.com/articles/10g/oracle-data-pump-10g.php
    Regards
    Biju

  • Reading one line from a text file into an array

    i want to read one line from a text file into an array, and then the next line into a different array. both arays are type string...i have this:
    public static void readAndProcessData(FileInputStream stream){
         InputStreamReader iStrReader = new InputStreamReader (stream);
         BufferedReader reader = new BufferedReader (iStrReader);
         String line = "";          
         try{
         int i = 0;
              while (line != null){                 
                   names[i] = reader.readLine();
                   score[i] = reader.readLine();
                   line = reader.readLine();
                   i++;                
              }catch (IOException e){
              System.out.println("Error in file access");
    this section calls it:
    try{                         
         FileInputStream stream = new FileInputStream("ISU.txt");
              HighScore.readAndProcessData(stream);
              stream.close();
              names = HighScore.getNames();
              scores = HighScore.getScores();
         }catch(IOException e){
              System.out.println("Error in accessing file." + e.toString());
    it gives me an array index out of bounds error

    oh wait I see it when I looked at the original quote.
    They array you made called names or the other one is prob too small for the amount of names that you have in the file. Hence as I increases it eventually goes out of bounds of the array so you should probably resize the array if that happens.

  • How to import data from a text file into a table

    Hello,
    I need help with importing data from a .csv file with comma delimiter into a table.
    I've been struggling to figure out how to use the "Import from Files" wizard in Oracle 10g web-base Enterprise Manager.
    I have not been able to find a simple instruction on how to use the Wizard.
    I have looked at the Oracle Database Utilities - Overview of Oracle Data Pump and the Help on the "Import: Files" page.
    Neither one gave me enough instruction to be able to do the import successfully.
    Using the "Import from file" wizard, I created a Directory Object using the Create Directory Object button. I Copied the file from which i needed to import the data into the Operating System Directory i had defined in the Create Directory Object page. I chose "Entire files" for the Import type.
    Step 1 of 4 is the "Import:Re-Mapping" page, I have no idea what i need to do on this page. All i know i am not tying to import data that was in one schema into a different schema and I am not importing data that was in one tablespace into a different tablespace and i am not R-Mapping datafiles either. I am importing data from a csv file.
    For step 2 of 4, "Import:Options" page, I selected the same directory object i had created.
    For step 3 of 4, I entered a job name and a description and selected Start Immediately option.
    What i noticed going through the wizard, the wizard never asked into which table do i want to import the data.
    I submitted the job and I got ORA-31619 invalid dump file error.
    I was sure that the wizard was going to fail when it never asked me into which table do i want to import the data.
    I tried to use the "imp" utility in command-line window.
    After I entered (imp), i was prompted for the username and the password and then the buffer size as soon as i entered the min buffer size I got the following error and the import was terminated:
    C:\>imp
    Import: Release 10.1.0.2.0 - Production on Fri Jul 9 12:56:11 2004
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    Username: user1
    Password:
    Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Produc
    tion
    With the Partitioning, OLAP and Data Mining options
    Import file: EXPDAT.DMP > c:\securParms\securParms.csv
    Enter insert buffer size (minimum is 8192) 30720> 8192
    IMP-00037: Character set marker unknown
    IMP-00000: Import terminated unsuccessfully
    Please show me the easiest way to import a text file into a table. How complex could it be to do a simple import into a table using a text file?
    We are testing our application against both an Oracle database and a MSSQLServer 2000 database.
    I was able to import the data into a table in MSSQLServer database and I can say that anybody with no experience could easily do an export/import in MSSQLServer 2000.
    I appreciate if someone could show me how to the import from a file into a table!
    Thanks,
    Mitra

    >
    I can say that anybody with
    no experience could easily do an export/import in
    MSSQLServer 2000.
    Anybody with no experience should not mess up my Oracle Databases !

  • How to read sampled data info from a "*.au"file into an array?

    I need to manipulate the sound file directly using DSP, the first step is to read sampled data from "*.au" file into an array. How can I do that? Thanks a lot!!

    There is a file I/O tutorial in the Java Tutorial (google for Java Tutorial). You can read an .au file as bytes like any binary file.
    Or if you are using the Java Sound API, google for java sound api or java audio tutorial etc etc.

  • How to do import data from the text file into the mathscript window?

    Could anyone tell me how to do import data from text file into mathscript window for labview 8?
    MathScript Window openned, File, Load Data - it has options: custom pattern (*.mlv) or all files. 
    Thanks

    Hi Milan,
    Prior to loading data in Mathscript Window , you have to save the data from the Mathscript window (the default extension of the file is .mlv but you can choose any extension). This means that you cannot load data from a text file  that was not created using the Mathscript window.
    Please let me know if you have any further questions regarding this issue.
    Regards,
    Ankita

  • Access data from 2 SAP systems into WebDynpro..Please guide :)

    Hello,
    Is is possible to access/retrieve data from 2 seperate SAP systems in Web Dynpro?
    To ellaborate more:
    Under normal situation - We create a Model using which you can access the required BAPI/RFC and using the JCo this connection is complete.
    So, in the SLD there is one JCo connection/object for this model.
    Now as per my quesry, I want to access data from 2 systems... like CRM & R/3.
    So how can I do this:
    1. Create 2 seperate model objects and then do Model Context Mapping. If this is rite, then I will have to create 2 JCo connections in SLD.
    2. Is is possibe that under one model (example this model is accessing R/3), I need to access data from CRM <i><b>without creatiing another model</b></i>. So that are the possiblities? Secondly is this way/path recommended?If no, how should I proceed.
    Hope my requirements are clear
    Awaiting Reply.
    Thanks & Warm Regards,
    Ritu

    Ritu,
    There is no way you can create single model for 2 different R/3 systems (unless SAP decides to implement this in later versions).
    If you still want to stick with a single model approach, I would suggest to use <b>Webservice</b> model where the R/3 interaction part would be taken care by WebService.
    Ashutosh

  • I need to read data from a text file and display it in a datagrid.how can this be done..please help

    hey ppl
    i have a datagrid in my form.i need to read input(fields..sort of a database) from a text file and display its contents in the datagrid.
    how can this  be done.. and also after every few seconds reading event should be re executed.. and that the contents of the datagrid will keep changing as per the changes in the file...
    please help as this is urgent and important.. if possible please provide me with an example code as i am completely new to flex... 
    thanks.....  

    It's not possible to read from a file without using classes from the core API*. You'll have to get clarification from your instructor as to which classes are and are not allowed.
    [http://java.sun.com/docs/books/tutorial/essential/io/]
    *Unless you write a bunch of JNI code to replicate what the java.io classes are doing.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Delete data from a flat file using PL/SQL -- Please help.. urgent

    Hi All,
    We are writing data to a flat file using Text_IO.Put_Line command. We want to delete data / record from that file after data is written onto it.
    Please let us know if this is possible.
    Thanks in advance.
    Vaishali

    There's nothing in UTL_FILE to do this, so your options are either to write a Java stored procedure to do it or to use whatever mechanism the host operating system supports for editing files.
    Alternatively, you could write a PL/SQL procedure to read each line in from the file and then write them out to a second file, discarding the line you don't want along the way.

Maybe you are looking for

  • Post open item management account into non-leading ledger independently

    I want to use FB50L to post an open item management account balance value into non-leading ledger, the system throws out an error. I know it can not delete the sign ---open item. Could anyone give some advice? Thank you!

  • Last user login date

    Hi We use our DS as an authentication service. We have a business requirement whereby if a given user does not authenticate through LDAP after period of inactivity to suspend the User�s account and subject user to password reset. H ow do you retrieve

  • Change Document - CDHDR

    HI   I have created a transaction. I have also created a change document object for logging changes to the transaction. I have also made necessary calls in the transaction for logging the changes. When i change the transaction or enter data manually

  • HP photosmart 5514 wont print black

    I have been haveing problems with my printer no printing black I already try clean the printhead and nothing. I also believe  I dont have warrenty. I have run a print status and print quality report and both only show the color ink.

  • How can I backup if the backup always gets stopped and the iPhone 4S restarts itself (iOS 8.1.3 12BA466)?`

    When I try to do a backup it always starts itself new. My photos and notes are synced but all the other apps not anymore since December. Plus since this weekend it refuses to go on the internet. Since January it restarts itself about 20 times a day.