View Single Post
  #10 (permalink)  
Old 07-06-2008, 03:01 AM
obdi obdi is offline
Member
 
Join Date: Jul 2008
Location: CA
Posts: 15
obdi is on a distinguished road
I tried the new math way to do the (#3 (permalink)) problem i posted, after the math, i did
Code:
private class TimeStamp implements ActionListener { public void actionPerformed(ActionEvent e) { Action += 2; repaint(); if (Action >= RunDistance) { Action = 0; } } }
and the 4 Balls are not moving,
Code:
RunDistance = (int) Math.pow( (double)(ROW*ROW+COL*COL), 0.5d );
is what i did in paint(). help.

i'm trying to make 4 balls move on the hypo. of the trangle in the rectangle(this is the way i'm thinking), and make them tangent to the frame window when they get to the coners.

Last edited by obdi : 07-06-2008 at 03:05 AM.
Reply With Quote