FileDocCategorySizeDatePackage
Fractal1.javaAPI DocExample2028Thu Feb 04 16:10:38 GMT 1999None

Fractal

public class Fractal extends Applet implements Runnable

Fields Summary
Thread
calcThread
boolean
sectionsToCalculate
static int
nSections
Constructors Summary
Methods Summary
voiddoCalc(int i)

		// Calculate section i of the fractal
	
public voidpaint(java.awt.Graphics g)

		// paint the calculated sections
	
public voidrun()

		for (int i = 0; i < nSections && sectionsToCalculate; i++) {
			doCalc(i);
			repaint();
		}
	
public voidstart()


	   
		Thread current = Thread.currentThread();
		calcThread = new Thread(this);
		calcThread.setPriority(current.getPriority() - 1);
		calcThread.start();
	
public voidstop()

		sectionsToCalculate = false;