Search:

Type: Posts; User: csharp100

Search: Search took 0.11 seconds.

  1. Replies
    12
    Views
    2,049

    Re: Declaring a winner in a Race Car Program

    Ok so we can go along those lines, but then that begs the question, if a user desides to change the size of the frame, how does one know the size of the frame? What would be a value of that or better...
  2. Replies
    12
    Views
    2,049

    Re: Declaring a winner in a Race Car Program

    Yes. Since the panel width is "z = 1200", I assume one lap would roughly be less than a panel width. Is that not correct?
  3. Replies
    12
    Views
    2,049

    Re: Declaring a winner in a Race Car Program

    Yah good call. Gotta figure out how to count the laps. Not really sure how to go about it efficiently. I did have a loop with repaint() in it and it really did not seem efficient enough.
    It was:

    ...
  4. Replies
    12
    Views
    2,049

    Re: Declaring a winner in a Race Car Program

    Ok so here is some updated code But I am not see the flaw. It doesn't seem to stop after 3 laps. Can someone point out what might be wrong? I really appreciate it.
    Here is the updated code:

    ...
  5. Replies
    12
    Views
    2,049

    Re: Declaring a winner in a Race Car Program

    Thank You.
  6. Replies
    12
    Views
    2,049

    Re: Declaring a winner in a Race Car Program

    if (k < 341) {
    repaint();
    k++;

    Is where I will get 3 "laps" based on the panel width of 1200.



    I do not
  7. Replies
    12
    Views
    2,049

    Declaring a winner in a Race Car Program

    Hello All!

    I have the following code:


    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.Random;
Results 1 to 7 of 7