title: JAVA: Bubble sorting ArrayList in jTable
body: <p>I am making a jTable of different activities. This table has a column : "Time". I want to sort jTable using Bubble Sort based on this column.</p>
  
  <p>For example: now I have a table where activity "CALL" is 4 hours/week, activity "OMG: is 7 hours/week and activity "ALLO" is 5 hours/week. I want to sort this table so that , first row will be CALL (4 h/w), then second will be ALLO (5 h/w), and third will be OMG (7 h/w). </p>
  
  <p>How would I do that with Bubble Sort?</p>
  
  <p>Look at this picture: <a href="https://i.stack.imgur.com/UObeW.png" rel="nofollow noreferrer">https://i.stack.imgur.com/UObeW.png</a></p>
  
  <p>I already retrieved values from the column "Time" into ArrayList:</p>
  
  <pre><code>    DefaultTableModel model = (DefaultTableModel) jTable1.getModel();
      ArrayList list = new ArrayList();
          for(int i = 0;i&lt;jTable1.getModel().getRowCount();i++)
          {
          list.add(jTable1.getModel().getValueAt(i,3)); 
          }
  </code></pre>