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...
Type: Posts; User: csharp100
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...
Yes. Since the panel width is "z = 1200", I assume one lap would roughly be less than a panel width. Is that not correct?
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:
...
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:
...
Thank You.
if (k < 341) {
repaint();
k++;
Is where I will get 3 "laps" based on the panel width of 1200.
I do not
Hello All!
I have the following code:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.Random;