-------------------------------------------------------------------------------- /* A Christmas gift from RealApplets Http://www.realapplets.com By Bavo Bruylandt You are allowed to make changes as long as you give me any credit for the surviving code :) Enjoy! */ import java.awt.*; import java.applet.*; import java.net.*; public class RealSnow extends Applet implements Runnable { Thread animThread; Graphics buffG; Image buff; Image bgimage; Dimension dim; boolean running; int delay= 40; Wind [] winds; Snow [] flakes; int numberOfFlakes = 500; int numberOfWinds = 0; public void init() { setBackground(Color.black); dim = getSize(); buff = createImage(dim.width,dim.height); buffG = buff.getGraphics(); String bg = getParameter("Background"); numberOfFlakes = Integer.parseInt(getParameter("NumberOfFlakes")); numberOfWinds = Integer.parseInt(getParameter("Turbulence")); bgimage = getImage(getDocumentBase(),bg); animThread = new Thread(this); animThread.start(); running = true; initWind(); initSnow(); } private void initSnow() { flakes = new Snow [getNumberOfFlakes()]; for (int a=0;a flakes[a].getXco()) { if (wind.getYco() < flakes[a].getYco() && wind.getYco()+wind.getHeight() > flakes[a].getYco()) { flakes[a].dodge(wind.getSign()*wind.getStrength()); } } } } } } } } private void makeFlakes() { for (int a = 0;a<4;a++) { for (int b = 0;b