title: Java, String to JTable
body: <p>I have a program that using JSCH runs a command on a server and get the following results out</p>
  
  <pre><code>   rcpt  7554   Jan-21 01-03:43:27       ? /usr/bin/Program
  ncuser2  7202   Jan-21 01-04:22:08       ? /usr/bin/Program
      lyn  6277   Dec-17 36-02:14:51       ? /usr/bin/Program 10.15.1.104:0.0
      lyn  6268   Dec-17 36-02:15:17       ? /usr/bin/Program 10.15.1.104:0.0
  </code></pre>
  
  <p>These results are stored in one string.</p>
  
  <p>What I need to do is convert/Output these results into a JTable.</p>
  
  <p>What I cant work out is how to get what's in the single string above into multiple cells of a JTable in Swing so it looks like this</p>
  
  <pre><code>  User | PID | Launch | Runtime    | TTYP | Program |
    -----------------------------------------------
    rcpt | 7554| Jan-21 |01-03:43:27 | ?    |/usr/bin/Program
  ncuser2| 7202| Jan-21 |01-04:22:08 | ?    |/usr/bin/Program
      lyn| 6277| Dec-17 |36-02:14:51 | ?    |/usr/bin/Program 10.15.1.104:0.0
      lyn| 6268| Dec-17 |36-02:15:17 | ?    |/usr/bin/Program 10.15.1.104:0.0
  </code></pre>
  
  <p>The main issue I am having is finding a way of splitting the string, I want to do it on space, looking at this. Even if I could split it into variables for every space I could possibly work it out but at the moment I don't have a clue!</p>