File tree Expand file tree Collapse file tree 2 files changed +5
-11
lines changed Expand file tree Collapse file tree 2 files changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ public class Sorting extends Main {
2121    // Progress Bar 
2222    JProgressBar  jb1 ;
2323
24-     JSlider  slider  = new  JSlider (0 , 200 ,  0 );
24+     JSlider  slider  = new  JSlider (0 , 100 ,  2 );
2525
2626    public  Sorting (){
2727        // Panel for options (bubble sort, insertion sort...) 
@@ -43,9 +43,9 @@ public Sorting(){
4343        jbtStart .setBackground (Color .GRAY );
4444
4545        // Slider 
46-         slider .setPreferredSize (new  Dimension (150 , 30 ));
47-         slider .setMajorTickSpacing (50 );
48-         slider .setPaintTicks (false );
46+         //  slider.setPreferredSize(new Dimension(150, 30));
47+         //  slider.setMajorTickSpacing(50);
48+         //  slider.setPaintTicks(false);
4949
5050        // Adding elements to pPanel1 
5151        pPanel1 .add (jbtRandomize );
@@ -112,12 +112,6 @@ else if (e.getSource() == jbtSelection) {
112112            else  if  (e .getSource () == jbtStart ) {
113113                System .out .println ("jbtStart button clicked" );
114114            }
115-             // else if(e.getSource() ==){ 
116- 
117-             // }else{ 
118-             //     S 
119-             // } 
120-             // setVisible(false); // will close the previous window 
121115        }
122116    } // ListenerClass 
123117
Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ public Void doInBackground() throws InterruptedException {
182182                    randow_index  = new  Random ().nextInt (getSIZE ());
183183                    swap (j , randow_index );
184184
185-                     Thread .sleep (10 );
185+                     Thread .sleep (20 );
186186                    repaint ();
187187                }
188188                return  null ;
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments