for(int x = 0; x < array.length - 1; x++){
for(int y = 0; y < array.length - 2; y ++){
if(array[y] > array[y+1]){
swap(array, y, y+1);
}
repaint(); // ask to repaint the component
}
}
if code is on above, but i can't get the result i expect. then repaint() paint the sorted array.
my expected result is to paint the array that is not sorted yet.
how!? help!!
Mayank.