CustomItem: Table

0 respostas
S
Olá a todos, criei em meu sistema uma tabela com CustomItem de acordo com este artigo: http://javafree.uol.com.br/artigo/871431. Mas não consigo mostrar a tabela num form. Ao dar um display no form, a tabela não aparece. Fiz um teste com uma pequena implementação de CustomItem e também não aparece o que crio com CustomItem.
for (int i = 0; i < nomes.size(); i++) {
            NomesCad item = (NomesCad) vecNomes.elementAt(i);
            int id = item.getRecordId();
            String data = item.getData();
            int turma = item.getTurma();
            int setor = item.getSetor();
            int lote = item.getLote();
            String talhao = item.getTalhao();
            int func = item.getFunc();
            float qtdade = item.getQtdade();
            String tipoApto = item.getTipoApto();
            String exportou = item.getExportou();
            linhas.addElement(Integer.toString(func));
            linhas.addElement(Integer.toString(setor));
            linhas.addElement(Integer.toString(lote));
            linhas.addElement(talhao);
            linhas.addElement(Float.toString(qtdade));
            }
        colunas = new Vector();
                colunas.addElement("Func");
	colunas.addElement("Set");
                colunas.addElement("Lot");
                colunas.addElement("Tal");
                colunas.addElement("Qtde");
        largura = new int[5];
        largura[0]=20;
        largura[1]=50;
        largura[2]=50;
        largura[3]=50;
        largura[4]=50;
        tbciAptoCQ = new JMTable(colunas,linhas,1,240,largura);
        tbciAptoCQ.addCommand(cVoltaAptoCQ);
        tbciAptoCQ.addCommand(cSelCanaQueimada);
        tbciAptoCQ.setItemCommandListener(this);

        fListaApto.deleteAll();        
        fListaApto.append(tbciAptoCQ);
        fListaAptoa.addCommand(cVoltaAptoCQ);
        fListaApto.setItemStateListener(this);
        fListaApto.setCommandListener(this);
Criado 29 de março de 2011
Respostas 0
Participantes 1