Created
          August 4, 2020 15:44 
        
      - 
      
- 
        Save HashRaygoza/024c3c77f996f4e257fd793ca5227d1d 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 EventoProgreso implements PropertyChangeListener { | |
| private final JProgressBar barraProgreso; | |
| public EventoProgreso(JProgressBar barra) { | |
| barraProgreso = barra; | |
| } | |
| @Override | |
| public void propertyChange(PropertyChangeEvent evt) { | |
| // Checamos si la propiedad modificada es progress | |
| if (evt.getPropertyName().compareTo("progress") == 0) { | |
| int progress = (Integer) evt.getNewValue(); | |
| System.out.println("********* Progreso: " + progress); | |
| barraProgreso.setValue(progress); | |
| } | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment