fill cells of a jtable in java

0

I need help, I want to simulate a Turing machine when I want to, to fill the cells I use a for but the problem is that it fills them in a staircase and they do not complete this is my code:

        while(fin==false){
         if(contador > salida.length-1){
            fin=true;
            break;
        }for(int i=0;i<salida.length;i++){
         if(actual==1){
             if(salida[contador]=='a'){
                  modelo.addColumn("a");
                  Datos[i]="x";
                  modelo.addRow(Datos);
                 actual = 1;
             }else if(salida[contador]=='b'){
                 modelo.addColumn("b");
                 Datos[i]="y";
                 modelo.addRow(Datos);
                 actual = 1;
             }if(salida[contador]=='☻'){
                 modelo.addColumn("☻");
                 actual =2;
             }
             contador++;
         continue;
         }}

    
asked by james L 10.06.2018 в 03:41
source

0 answers