Search:

Type: Posts; User: Norm

Search: Search took 0.40 seconds.

  1. Thread: Help Please

    by Norm
    Replies
    38
    Views
    1,447

    [SOLVED] Re: Help Please

    Ok, Good luck.
  2. Thread: Help Please

    by Norm
    Replies
    38
    Views
    1,447

    [SOLVED] Re: Help Please

    One more bug out. Maybe three left.
    Then a big redesign.
  3. Thread: Help Please

    by Norm
    Replies
    38
    Views
    1,447

    [SOLVED] Re: Help Please

    And I assume that the one balll moved as expected. Is that correct?
    Now run the test with two balls.

    Did you read post#30?
  4. Thread: Help Please

    by Norm
    Replies
    38
    Views
    1,447

    [SOLVED] Re: Help Please

    You can make assumptions and/or you can add printlns and look at the output and see if there is a pattern when a ball looks like it is "trapped on one side".
    What are the values of the balls...
  5. Thread: Help Please

    by Norm
    Replies
    38
    Views
    1,447

    [SOLVED] Re: Help Please

    Back to printing out the values of the balls positions. Only test with two balls to keep it simple. You might try changing the size of the window and the speed that the balls move for easier...
  6. Thread: Help Please

    by Norm
    Replies
    38
    Views
    1,447

    [SOLVED] Re: Help Please

    Can you describe what the messed part is now? After a few code changes, it could be acting differently than it was.
  7. Thread: Help Please

    by Norm
    Replies
    38
    Views
    1,447

    [SOLVED] Re: Help Please

    Yes that looks right. Also you could get rid of the creation of the thread: ball = new Thread...
    The Thread was created and started in another place in your code.
  8. Thread: Help Please

    by Norm
    Replies
    38
    Views
    1,447

    [SOLVED] Re: Help Please

    If you only started one ball by clicking one time with the mouse, then why is the run method called two times? Do you wonder why you got two lines printed out?
    It looks like you are creating and...
  9. Thread: Help Please

    by Norm
    Replies
    38
    Views
    1,447

    [SOLVED] Re: Help Please

    Should run be called twice every time a new ball is added?
    How many threads are supposed to be running for a ball?

    Run the test and only add one ball. How many threads are shown by the print out?
  10. Thread: Help Please

    by Norm
    Replies
    38
    Views
    1,447

    [SOLVED] Re: Help Please

    public void run()
    {

    System.out.println("run for " + Thread.currentThread().getName()); //<<<<<


    while(true)
    {

    Add this println to your code as shown above and execute it.
  11. Thread: Help Please

    by Norm
    Replies
    38
    Views
    1,447

    [SOLVED] Re: Help Please

    What is printed out by the printlns you put in the run method?
    Are the print outs what you expected?
  12. Thread: Help Please

    by Norm
    Replies
    38
    Views
    1,447

    [SOLVED] Re: Help Please

    Pretty boring. When posting long repeating group, use ... in the middle.
    You print outs don't show a lot of things about your program.
    One thing they do show is that there is only one delta value....
  13. Thread: Help Please

    by Norm
    Replies
    38
    Views
    1,447

    [SOLVED] Re: Help Please

    Post your printed output and I point out where the problems are.
    Or I'll tell you where you should add more print outs to see the problem.
  14. Thread: Help Please

    by Norm
    Replies
    38
    Views
    1,447

    [SOLVED] Re: Help Please

    Sorry, I don't understand what that means.

    So far I have found two problems by adding printlns and looking at the output.
    How are you doing?
  15. Thread: Help Please

    by Norm
    Replies
    38
    Views
    1,447

    [SOLVED] Re: Help Please

    Your code has very few comments describing its logic. It will take a long time to figure out what you are trying to do.
    Have you tried debugging it by adding lots of println statements to show the...
  16. Thread: Help Please

    by Norm
    Replies
    38
    Views
    1,447

    [SOLVED] Re: Help Please

    What is the problem then? Can you explain?

    Please post any code you are asking questions here on the forum.
  17. Thread: Help Please

    by Norm
    Replies
    38
    Views
    1,447

    [SOLVED] Re: Help Please

    Your post wasn't anything useful. If you need to copy the console:
    To copy the contents of the command prompt window:
    Click on Icon in upper left corner
    Select Edit
    Select 'Select All' - The...
  18. Thread: Help Please

    by Norm
    Replies
    38
    Views
    1,447

    [SOLVED] Re: Help Please

    You could write a loop to access the elements vs having the elements individually coded.
    Have the loop variable index the first dimension of the array.
Results 1 to 18 of 18