Javascript, Java Applet, & Output Buffering
Moderator: General Moderators
Javascript, Java Applet, & Output Buffering
I've got a for loop that iterates a 1000 times. And, in each iteration I'm calling a method in a java applet that lights up a pixel on the screen. I've been told that I should see the pixels light up after each iteration, instead of at the end of the loop; however, this isn't happening. Is there a way I can make this happen?
Grrr... I don't know enough Java/Javascript to word my question right. Here's code:
Should I be seeing the results of drawWorldPoint2d immediately after each call or only after the entire script is complete? I think this pertains to whether or not Java buffers output, but like I said, I don't know enough Java to be certain.
Code: Select all
for (t = 0; t < 3.16E7; t += 1000) {
// Calculate some position (x,y)
jGraph.drawWorldPoint2d(x,y);
}