title: Clickable html link in JTable
body: <p>I have looked everywhere without finding an answer. Sorry if this has been posted before.</p>
  
  <p>I know how to do a clickable URL when the cell itself only contains a URL, which basically just attaching a mouselistener to a table and getting which Row is clicked and getting the value. So that's easy.</p>
  
  <p>My issue is that I have several links inside one cell so I need different things to happen when the user click on those links. For example:</p>
  
  <pre><code>class MyTableModel extends AbstractTableModel {
  
  @Override
          public Object getValueAt(int rowIndex, int columnIndex) {
  
               switch (columnIndex) {
               case 0:
                    return "&lt;html&gt;&lt;a href='www.test.com'&gt;test1&lt;/a&gt; &lt;a href='www.test2.com'&gt;test2&lt;/a&gt;&lt;/html&gt;";
  
               default:
                      throw new IndexOutOfBoundsException();
               }    
          }
  }
  </code></pre>
  
  <p>So I have two different links that need to be next to eachother. How do I find out which one of them got clicked? </p>
  
  <p>Finding out which row was clicked is not difficult, but how do I find out which element inside the row was clicked?</p>
  
  <p>Edit: Can't use JEditorPane since it messes up the objects inside the cells.</p>