Advertisement
Guest User

Untitled

a guest
Dec 6th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.63 KB | None | 0 0
  1. protected void lista2(){
  2.    
  3.     DefaultListModel modelo = new DefaultListModel();
  4.     ControleBasico cCon = new ControleConsulta();
  5.     Object o=null;
  6.     Cliente a;
  7.     List<Object> listaCodCli = new ArrayList<>();
  8.     int maximo = 1999;
  9.     listaCodCli= cC.lista();    
  10.         for (int i = 0; i < listaCodCli.size(); i++) {                        
  11.             o = listaCodCli.get(i);            
  12.             a = (Cliente) o;
  13.             if(a!=null){
  14.             modelo.addElement("["+a.getCodCli()+"]");
  15.             PCLista.setModel(modelo);            
  16.                  
  17.              }
  18.                         }
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement