title: SortController: how to use a dynamic filter
body: <p>The <code>JXTable</code> from the SwingX project has a method to set a <code>RowFilter</code> directly on the <code>JXTable</code> (see <code>JXTable#setRowFilter</code>).</p>
  
  <p>It is unclear to me what you need to do when the filter implementation is dynamic. </p>
  
  <p>To compare: in the JDK they introduced the <a href="http://docs.oracle.com/javase/7/docs/api/javax/swing/RowSorter.html" rel="nofollow"><code>RowSorter</code></a> interface in JDK1.6, and this interface allows to attach a <code>RowSorterListener</code>. If you have a dynamic <code>RowSorter</code> (which can also be used for filtering), you can fire an event to those listeners when the filter changes (although this requires that the filter has access to the <code>RowSorter</code> as there is no such thing as a <code>DynamicRowFilter</code> or <code>RowFilterEvent</code> in the JDK).</p>
  
  <p>What I would expect is that I can set an "observable" <code>RowFilter</code> on the <code>JXTable</code> and that I have to do nothing. But as that seems not to be possible with the current API, what is the next best thing ?</p>
  
  <ul>
  <li>set the filter again each time it changes. Will this even have effect as it is the exact same instance as was previously set on the <code>JXTable</code> ?</li>
  <li>abuse the table events and just fire an event that your table model has been changed, which will retrigger the sorting/filtering</li>
  <li>do not use the <code>setRowFilter</code> method and create your own <code>TableRowSorter</code> and fall back on the JDK API.</li>
  </ul>