
-----------------------------------
Token
Fri Feb 24, 2006 7:11 am

Smoother Animation?
-----------------------------------
Hey, i'm new to Java and i was just wondering if there was some sort of a offscreenonly mode. if not, then how do i make this animation smoother? 


// The "Bounce" class.
import java.awt.*;
import hsa.Console;


public class Bounce
{
    static Console c;           // The output console

    public static void main (String [] args)
    {
        c = new Console (25, 90);
        int ballx, bally;
        ballx = c.getWidth () / 2;
        bally = c.getHeight () / 2;
        int [] x = new int [11];
        int [] y = new int [11];
        int [] xdir = new int [11];
        int [] ydir = new int [11];

        for (int i = 1 ; i  0 || x [i] = c.getHeight () - 5 && ydir [i] > 0 || y [i]  0 || y [i] 