Search:

Type: Posts; User: Xrrak

Search: Search took 0.31 seconds.

  1. Replies
    15
    Views
    1,820

    Re: Reading from a sequential file to an array

    I am using netbeans and I put the file in the src folder for the project with the java files.
  2. Replies
    15
    Views
    1,820

    Re: Reading from a sequential file to an array

    Scanner scan = new Scanner(new File("loanData.txt")); //provide file name from outside
    int counter = 0; //keep track of how many in the file
    while(scan.hasNextLine())
    {
    ...
  3. Replies
    15
    Views
    1,820

    Re: Reading from a sequential file to an array

    That worked as well. Thinking on it though I guess it is simplest to have it look on the main drive, unless there is a way to tell the program that the text file is in the same place the program is...
  4. Replies
    15
    Views
    1,820

    Re: Reading from a sequential file to an array

    I replaced the "/" with "C://Users/Xrrak" and that did the trick. Thanks again.
  5. Replies
    15
    Views
    1,820

    Re: Reading from a sequential file to an array

    If needed, I have also included the code for all for classes and the text file in case anyone needs to run it.



    package week5;

    /**
    *
    * @author Chad McCoy
    */
  6. Replies
    15
    Views
    1,820

    Re: Reading from a sequential file to an array

    Thanks for pointing me in the right direction everyone, I now have the program reading from a sequential file into an array. The only issue I am having is making the path anywhere except "/". I have...
  7. Replies
    15
    Views
    1,820

    Re: Reading from a sequential file to an array

    Thanks, know of any easy to understand tutorials for these ideas? I have looked at the Oracle tutorial site over and over and it just is not making sense to me.
  8. Replies
    15
    Views
    1,820

    Reading from a sequential file to an array

    I am having trouble figuring out what I want to do, and the idea seems like it would be simple. I have four lines in a text file, they are strings and include "7 years at 5.35%", "10 years at 5%",...
  9. Replies
    13
    Views
    849

    Re: Changing my GUI help

    Thanks Norm, thank goodness NetBeans IDE has a feature where you can highlight one { or } and the corresponding one highlights as well. I was missing a couple. Didn't realize the IDE did that until I...
  10. Replies
    13
    Views
    849

    Re: Changing my GUI help

    And I am referring to using the format when I added the section:


    mortgageTerms.addActionListener(
    new ActionListener() {

    public void...
  11. Replies
    13
    Views
    849

    Re: Changing my GUI help

    Again sorry line 100 is: public static void main(String[] args) { //creates a new instance of the MortgageCalc class and line 105 is the last }. I have tried adding the } between the last two }.
    ...
  12. Replies
    13
    Views
    849

    Re: Changing my GUI help

    Sorry the error is flagged at lines 100 and 105. I followed the same format as the other listeners, like lines 75 through 85. I have tried adding a } but that just made more errors.
  13. Replies
    13
    Views
    849

    Re: Changing my GUI help

    This is the full text of the error shown in NetBeans IDE:

    illegal start of expression

    Illegal static declaration in inner class <anonymous week3.MortgageCalc$1>
    modifier 'static' is only...
  14. Replies
    13
    Views
    849

    Re: Changing my GUI help

    I thought I had made some progress with my combobox but now I am getting an illegal start of an expression error at the main method and I am not sure why.



    import java.awt.*;
    import...
  15. Replies
    13
    Views
    849

    Re: Changing my GUI help

    Thank you for both the indention tip as well as the links!
  16. Replies
    13
    Views
    849

    Re: Changing my GUI help

    Sorry I tried editing to show the correct indentations, but it did not work.
  17. Replies
    13
    Views
    849

    Changing my GUI help

    I hope this is posted in the correct forum, I have a question about changing my GUI. This is for school so I do not want anyone to write the code for me, but pointing me to a beginners tutorial on...
  18. Replies
    2
    Views
    835

    Help with my loop

    Hi I am currenlty taking my first Java class and I am having a little trouble. My current assignment involves modifying my payroll program application so it continues to request employee information...
Results 1 to 18 of 18