Search:

Type: Posts; User: Norm

Search: Search took 0.20 seconds.

  1. Replies
    18
    Views
    863

    Re: My program is not displaying the answer :(

    @jocdrew21 Please read: http://www.javaprogrammingforums.com/cafe/9544-problem-spoon-feeding.html
  2. Replies
    18
    Views
    863

    Re: My program is not displaying the answer :(

    The way to tell is to debug the code. I would add several println() statements to print out the values of all the variables used in the computations to see what their values are.
  3. Replies
    18
    Views
    863

    Re: My program is not displaying the answer :(

    Where is the value computed that is assigned to the variable shown in the textfield?
    Look at the contents of the variables used in the computation to see if they are correct.
    For example are they...
  4. Replies
    18
    Views
    863

    Re: My program is not displaying the answer :(

    Ok, that's progress. Now you see a value. Now Where is the variable whose value is placed in the textfield, assigned a value?
  5. Replies
    18
    Views
    863

    Re: My program is not displaying the answer :(

    Do it one step at a time:
    Where is totalJTextField set to a value? What method is the statement in?
  6. Replies
    18
    Views
    863

    Re: My program is not displaying the answer :(

    I see some code to set totalJTextField's value.
    Is the code that does that being executed?

    Trace back through the methods that are called to see if the code to set the value is being executed.
  7. Replies
    18
    Views
    863

    Re: My program is not displaying the answer :(

    What are you expecting to be displayed?
    Where are you expecting it to be displayed?
Results 1 to 7 of 7