Created
          August 4, 2020 15:45 
        
      - 
      
- 
        Save HashRaygoza/f7c3609f8156851efdc998bd2750539d to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | public class EventoOperacionRapida implements ActionListener { | |
| private JProgressBar barra; | |
| Integer valor = 0; | |
| Boolean direccion = true; | |
| public EventoOperacionRapida(JProgressBar b) { | |
| barra = b; | |
| } | |
| @Override | |
| public void actionPerformed(ActionEvent e) { | |
| if(valor == 100) { | |
| direccion = false; | |
| } | |
| if(valor == 0){ | |
| direccion = true; | |
| } | |
| if(direccion == true) { | |
| valor++; | |
| } else { | |
| valor--; | |
| } | |
| System.out.println(valor + " de 100"); | |
| barra.setValue(valor); | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment