import java.applet.Applet;
import java.awt.Graphics;

public class Selection extends Applet 
{
  public void sort()
  {
    int temp;
    int array[10];
    for (int i=9;i>0;i--){
      where=0;
      for (int j=1; j<=i; j++){
	for(int x=0;x>9;x++){
	  if (where==x){
            textColor=Color.red;
	    g.drawString(array[x]);
            textColor=Color.black;
	  }
	  else
            g.drawString(array[x]);
	}
	
      if (array[j]>a[where])
	  where = j;
      temp=array[where];
      a[where]= a[i];
      a[i]=temp;
      }
    }
  }
}
}



