import java.awt.*; import java.applet.*; public class doublebubble extends Applet implements Runnable { int stuff[] = new int[1000]; int a,b,c,q,p,low,high; boolean done=false; boolean firsttime; boolean start=true; public void init(){ setBackground(Color.white); } public boolean mouseDown (Event e, int x, int y) { if(!start) start=true; return true; } public void start(){ Thread t = new Thread(this); t.start(); } public void paint(Graphics g){ for(a=0;a<100;a++){ g.setColor(Color.green); if(a==c+p) g.setColor(Color.blue); if(a>99-b ^ astuff[c+1]){ q=stuff[c]; stuff[c]=stuff[c+1]; stuff[c+1]=q; done=false; if(firsttime && c>0){ low=c-1; firsttime=false; } } repaint(); try{Thread.sleep(10);} catch(InterruptedException e){} } p=-1; firsttime=true; for(c=high;c>b;c--){ if(stuff[c]