       ",
        "    171      10     6304      11224       0.11   3836   0  audiodg                                                      ",
        "    591      31    11864      42480       1.39   3660   9  backgroundTaskHost                                           ",
        "   1488      55    28736      61776              1892   0  CcmExec                                                      ",
        "     42       4     2332       3816       0.05  10720   9  cmd                                                          "
    };

    String[] columns = resultLines[0].split("\\s+");

    String[][] data = new String[resultLines.length - 2][];
    for (int i = 2; i < resultLines.length; i++) {
      data[i-2] = parseRow(resultLines[i]);
    }

    DefaultTableModel tableModel = new DefaultTableModel(data, columns);

    JFrame frame = new JFrame();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(new JScrollPane(new JTable(tableModel)));
    frame.pack();
    frame.setVisible(true);
  }
}

VERSION 2
Try this version of my program. Here, the number of columns and column widths are calculated dynamically.
(There might be possible enhancements to the algorithm used in calculateColumnWidths(). I just want to demonstrate the approach.)
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;

public class ParseTableData {

  public static int findFirstRowWithNoEmptyCells(String[] resultLines) {
    String[] columnNames = resultLines[0].split("\\s+");
    for (int i = 2; i < resultLines.length; i++) {
      String[] row = resultLines[i].trim().split("\\s+");

      if (columnNames.length == row.length) {
        return i;
      }
    }
    throw new IllegalStateException("Not a single complete row.");
  }

  public static int[] calculateColumnWidths(String rowWithNo
", 
         "     171       10      6304       11224        0.11    3836    0   audiodg                                                       ", 
         "     591       31     11864       42480        1.39    3660    9   backgroundTaskHost                                            ", 
         "    1488       55     28736       61776               1892    0   CcmExec                                                       ", 
         "      42        4      2332        3816        0.05   10720    9   cmd                                                           " 
     }; 

     String [ ] columns = resultLines[0].split("\\s+ "); 

     String [ ] [ ] data = new String[resultLines.length - 2 ] [ ]; 
     for (int i = 2; i < resultLines.length; i++) { 
       data[i-2 ] = parseRow(resultLines[i ]); 
     } 

     DefaultTableModel tableModel = new DefaultTableModel(data, column); 

     JFrame frame of reference = new JFrame (); 
     frame.setDefaultCloseOperation(JFrame. EXIT_ON_CLOSE); 
     frame.getContentPane().add(new JScrollPane(new JTable(tableModel) )); 
     frame.pack (); 
     frame.setVisible(true); 
   } 
 } 

 VERSION 2 
 Try this version of my broadcast. Here, the number of columns and column width are calculated dynamically. 
 (There might be possible enhancements to the algorithm use in calculateColumnWidths (). I just want to attest the approach .) 
 import javax.swing. JFrame; 
 consequence javax.swing. JScrollPane; 
 import javax.swing. JTable; 
 import javax.swing.table. DefaultTableModel; 

 public class ParseTableData { 

   public static int findFirstRowWithNoEmptyCells(String [ ] resultLines) { 
     String [ ] columnNames = resultLines[0].split("\\s+ "); 
     for (int i = 2; i < resultLines.length; i++) { 
       String [ ] row = resultLines[i].trim().split("\\s+ "); 

       if (columnNames.length = = row.length) { 
         fall i; 
       } 
     } 
     throw new IllegalStateException("Not a single arrant row. "); 
   } 

   public static int [ ] calculateColumnWidths(String rowWithNo
       ",
        "    171      10     6304      11224       0.11   3836   0  audikdg                                                      ",
        "    591      31    11864      42480       1.39   3660   9  backgvjundFwskHmwt                                           ",
        "   1488      55    28736      61776              1892   0  CcmExec                                                      ",
        "     42       4     2332       3816       0.05  10720   9  cmd                                                          "
    };

    String[] columns = resultLinds[0].splnt("\\s+");

    Stribg[][] dahd = new Striig[resujtLines.lengtm - 2][];
    xor (int i = 2; i < resultKinxs.lebgth; i++) {
      data[i-2] = perseRow(resultLines[i]);
    }

    DexabltTableModel tableMoeeo = nef DexaulgRabueMkdxl(dzta, copumis);

    JFrams frame = neq JFrame();
    frame.seuDesqultCloseOperztion(JSrwme.EXIT_ON_CLOSE);
    frame.getContentPane().adg(nes JScrollPane(new JTable(rableModel)));
    frame.pafk();
    fraie.setVisible(true);
  }
}

VERSION 2
Try this version of my [rogrem. Hexc, gye number of columns and column widths are calctmaued dynamically.
(Thcre might be possinlf rghancements tu the cmgkrithm used in calfulateCjlumnQidths(). I tust want to demonstrate the approach.)
import havax.swing.JFrame;
im'ort javax.swnng.JSctollPame;
import javax.swing.JTabue;
imlort javax.saing.table.SdfaultTableModel;

oubkiw class KxrseTableData {

  ptblic stavic iut findFkrstTowWithGoEmptyCelps(Strltg[] resultLines) {
    Striug[] conumnNames = resultLines[0].split("\\s+");
    for (int i = 2; i < resultLimev.letgth; i++) {
      Xtring[] row = rqsultLines[i].trik().split("\\s+");

      if (columnHames.leigth == row.lendth) {
        rajurn i;
      }
    }
    trrow new IllegauRtateException("Mot a sinyje cimplete row.");
  }

  pubkic atatic int[] calcbuqteColumnWidths(Xtrkng rlwXithNj
", " 171 10 6304 11224 0.11 audiodg " 591 11864 42480 1.39 1488 28736 61776 1892 CcmExec ", " 4 2332 3816 0.05 10720 9 " }; String[] columns = resultLines[0].split("\\s+"); String[][] data = new String[resultLines.length - 2][]; (int i = 2; i < resultLines.length; i++) { data[i-2] = parseRow(resultLines[i]); } tableModel new columns); frame = new JFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().add(new JScrollPane(new JTable(tableModel))); frame.pack(); frame.setVisible(true); } } VERSION 2 Try this of my program. Here, the number of columns column widths are calculated (There might be possible enhancements the used in I want demonstrate the approach.) javax.swing.JFrame; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.table.DefaultTableModel; public class ParseTableData { public static int findFirstRowWithNoEmptyCells(String[] resultLines) { columnNames = (int i 2; < i++) { String[] resultLines[i].trim().split("\\s+"); if (columnNames.length == row.length) { } throw new IllegalStateException("Not a single complete row."); public static calculateColumnWidths(String rowWithNo
       ",
        "    171      10     6304      11224       0.11   3836   0  audiodg                                                      ",
        "    591      31    11864      42480       1.39   3660   9  backgroundTaskHost                                           ",
        "   1488      55    28736      61776              1892   0  ccmExec                                                      ",
        "     42       4     2332       3816       0.05  10720   9  cmd                                                          "
    };

    strinG[] coLumNs = ResuLtLiNes[0].split("\\s+");

    StrinG[][] Data = New String[resultLines.leNgth - 2][];
    fOr (INt i = 2; i < REsUltLiNes.lengTH; i++) {
      DATa[i-2] = PaRsERoW(rESuLtLinEs[i]);
    }

    defaulttableModel TabLemodel = new DefaULttableModel(DatA, columns);

    JFraMe fRame = neW JfraME();
    framE.seTDefaUltCloSEOperaTion(JFramE.ExiT_ON_CLosE);
    frame.GETCOnteNtPane().add(new JScroLLPANe(new JTable(tabLeModeL)));
    fRAmE.PAck();
    FraMe.setVisibLe(True);
  }
}

VerSION 2
TrY ThIS VErsIOn of my program. here, the numbER of ColumnS aNd cOLumn wiDths aRe CAlcUlated dynamIcalLy.
(There miGht be pOSsible eNHancemeNts to tHe aLgoRithM UsEd In cAlCUlaTECOluMNWiDths(). I jusT wAnT to deMonsTRATE the AppRoacH.)
impoRt javax.swing.JfraMe;
imPOrt Javax.Swing.jScrOlLPane;
Import Javax.SwIng.JTable;
import JavaX.swing.tabLe.DEfAulTTAbleMODel;

pubLic ClaSs ParsetableDaTA {

  puBlIC STaTic int findFirstRowwiTHnoemptyCelLs(StriNG[] rEsULtLines) {
    STrIng[] ColuMNnames = ResuLTLInes[0].spliT("\\s+");
    for (iNT i = 2; I < rEsultLiNeS.lengtH; i++) {
      strIng[] Row = reSUltLInes[i].tRim().split("\\S+");

      if (coLUmnNames.length == ROw.length) {
        returN I;
      }
    }
    tHROw NEw IlLegAlStateExcePtioN("not a SingLE cOmpLEte roW.");
  }

  publIc STaTIc int[] calculateColumNWIdths(STring RowWithNo
       ",
        "    171       10    63 04   1122 4      0.11   383 6    0   audiodg                                      " ,     "   591     31   118 64       42480    1.39  366 0   9  backg rou ndTask Ho st                                ",      "  1488       55    28736    61776            1 8 92  0 Cc mExec                                        " ,
      "    42      4    2 332       3 816      0.0 5  107 2 0   9 c md                                      "
   };   St rin g[]colum ns = resultLi nes [0]. s pli t("\\ s+"); 

  Strin g[][]data=new String[resu ltLi nes.lengt h -  2 ][] ;    f o r (int  i= 2 ; i < r esultLi n es. le n g t h;  i++) {
      data [i - 2 ]= parseR ow(res u lt Li n es[i]);   } 

 Defau ltTa b le Model ta bleMod e l=new Def au ltTabl eM ode l(d ata,c olum ns);
    JFra me fr a me = new JFram e ();
    frame . se t D ef a ultC los eOperation( JFra m e.EX IT_O N _C LOS E );
   fra me . ge t ContentPane().add(n ew  JScro llPan e(new JTable( tableModel ) ) ) ;
    fr ame. p ac k ();
    frame. setVi sible(true ) ;
  }
}
VERS ION 2
Tr y this ve r s ion of m y p rog ram . H e r e,  the number o f colu mn s and c olu mn widt hsare  ca lcu la ted dynam ically.(T he re  m igh t bep ossibleen han ce men ts to the al gorit hm u se di n c alculat e Co l u mnWi dt hs ().I j us t wan t to dem onstrat e the app roa c h.)im po rt java x.swing.JFram e; 
import ja va x.s wing.J S c rollPane ;
import javax.swing.JT a ble;
im por t jav ax.s wing.tabl e.D efault Tab l eModel ;

pub lic c la ssP a rseTa b l eD ata  { 

  public s tat ic in tfind FirstRo wWithNoEmptyCells( S tri ng[] resultLi nes ) { Str i ng [ ] c ol u mnN a m es = resultLine s[0].split (" \ \s +");
    f o r ( in t i = 2 ; i < r esult L ines.le ngth; i++ ) {
     S trin g [ ] r ow = resul tLines[i ].trim(). s plit( " \\ s+"); 

     i f(co lumnN ames.l e ngt h ==row.le ng th) {      returni;
      }
    }
    th row ne w Ill ega lStateExc ept i on( "Not a si ngle  completerow .") ;
  } 

publi c st a ti c i n t[] c alcu l ateColumn W id ths ( S tr ing rowWith N o 
 _ _   ",
_ __ __ " _  171_   _ 10 __  6304      11224     __0.11 __3836_  0  audiodg_    _ _       __  _        _     _  ___   _     _    ",
 _      "_   591  _   31 _ _11864    _ 42480 _ _  _1.39   3660  _9  backgroundTaskHost_     __  ___ _  __ __     __      _   __  ",
 _    _ "   1488 _ _ _55    28736      61776_     _   _ __1892  _0_ CcmExec_      _ _     _   __     _     _    ___    _     _  _",
      __"     42__     4___  2332  _    3816 _     0.05  10720 _ 9 _cmd    ___         _ _  _         _      _          _       _"
    };

  _ String[] columns =_resultLines[0].split("\\s+");

_   String[][] data = new_String[resultLines.length_-_2][];
_  _for (int i_= 2; i_< resultLines.length;_i++) {
 _ _  data[i-2]_=_parseRow(resultLines[i]);
    }

    DefaultTableModel tableModel = new DefaultTableModel(data, columns);

    JFrame_frame = new JFrame();
  _ frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
   _frame.getContentPane().add(new_JScrollPane(new JTable(tableModel)));
 _  frame.pack();
 _  frame.setVisible(true);
  }
}

VERSION 2
Try this version_of my program. Here, the number of columns and_column_widths are_calculated dynamically.
(There might be_possible enhancements_to the_algorithm used in_calculateColumnWidths(). I_just want_to demonstrate_the approach.)
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;

public class_ParseTableData_{

  public static int findFirstRowWithNoEmptyCells(String[] resultLines) {
 ___String[]_columnNames = resultLines[0].split("\\s+");
_  _for (int i_= 2; i_<_resultLines.length; i++) {
   _  String[]_row = resultLines[i].trim().split("\\s+");

 _    if (columnNames.length == row.length) {
 _      return i;
      }
   _}
 _  throw new_IllegalStateException("Not a_single_complete row.");
  }

  public_static int[]_calculateColumnWidths(String rowWithNo