// Simple Java Applet to generate a black and white Mandelbrot set // Written by phgod on 20050721 import java.applet.*; import java.awt.*; public class bwMandelbrot extends Applet { int width, height; public void init() { // The calling HTML determines the size width = getSize().width; height = getSize().height; setBackground( Color.white ); } public void paint(Graphics g) { final int a_MIN=1, a_MAX=width-2, b_MIN=1, b_MAX=height-2; final int da=1, db=1; // The bounding box g.setColor(Color.black); g.drawRoundRect(a_MIN, b_MIN, a_MAX, b_MAX, 15, 15); for(int ia=a_MIN; ia2 if(x*x+y*y>4) return false; } return true; } }