title: Refresh a Jlist from another JFrame
body: <p>i want to refresh a JList when i push a button in another JFrame.</p>
  
  <p>So i have a JFrame GuiBoss that manages employees (add,delete,update).When i press the button add, another Jframe opens, in wich i create a new employee.</p>
  
  <p>//Open the "add_form" where i give details about a new employee.</p>
  
  <pre><code>private void btnAddActionPerformed(java.awt.event.ActionEvent evt) {                                       
      GuiBoss gb = new GuiBoss(contrb,boss);
      Add_form af = new Add_form(gb,contrb,boss);
      af.setVisible(true);
  
  }
  </code></pre>
  
  <p>//refresh the list with the new employee added.</p>
  
  <pre><code>public void refresh(Employee e){
      System.out.println("I reach this point!");
      //if i print e.getName() it works, printing the right name that i give in the    "add_form"
      listModel.addElement(e);
      //listModel.clear(); //don't work either.
  
  }
  </code></pre>
  
  <p>My problem is that when i submit the details about the new employee i call the function refresh(Employee e) from the GuiBoss frame , the message ("I reach this point!") shows up on the console, the size of the listModel changes, but the list it doesen't refresh.
  Also i must say that i set the model properly for the list.</p>
  
  <p>//take data from form and call refresh(Employee e) from the main frame("GuiBoss")</p>
  
  <pre><code>private void btnAddActionPerformed(java.awt.event.ActionEvent evt) {                                       
      //String Id = txtID.getText();
      String UserName = txtName.getText();
      txtHour.setVisible(false);
      boolean b = false;
      if(rbtnYes.isSelected() == true){
          b = true;
      }
      if(rbtnNo.isSelected() == true){
          b = false;
      }
      if(rbtnYes.isSelected()==false &amp;&amp; rbtnNo.isSelected() == false){
          System.out.println("Select the presence!");
      }
      else{
          txtOra.setVisible(true);
          String Hour = txtHour.getText();
          e = new Employee(UserName,b,Hour,boss);  //boss i get from main frame when i start this add new employee form
          contrb.addEmployee(e);
          gb.refresh(e);  //gb is of type GuiBoss were i have the function that does      
          // the refresh
      }  
  }
  </code></pre>
  
  <p>Please let me know if u have any ideeas.Thanks.</p>