Note that there are some explanatory texts on larger screens.

plurals
  1. POCreating and using Multiple Filters/Searches using JTable or GlazedLists
    text
    copied!<p>I looked up how to use multiple filters on here with a regular table and the answers all pointed to <a href="http://publicobject.com/glazedlists/" rel="nofollow noreferrer"><code>GlazedLists</code></a>. However, the answers didn't specify how to use it. I was able to get one filter to work but do not know how to get more than one. For one filter I used:</p> <pre><code> // nameE is a BasicEventList containing classes (name) which // contain the table values TextFilterList filtered = new TextFilterList(nameE); JTextField filterEdit = filtered.getFilterEdit(); // Inside the table value class (name) there is a filter for myName public void getFilterStrings(List baseList) { baseList.add(myName); } </code></pre> <p>Duplicating the code and creating another <a href="http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JTextField.html" rel="nofollow noreferrer"><code>JTextField</code></a> does not work. I looked this problem up and it appears <a href="http://publicobject.com/glazedlists/glazedlists-1.7.0/api/ca/odell/glazedlists/matchers/CompositeMatcherEditor.html" rel="nofollow noreferrer"><code>CompositeMatcherEditor</code></a> may work. The problem is I do not know how to implement this. </p> <p>Also, I am using Eclipse. I downloaded <a href="http://publicobject.com/glazedlists/" rel="nofollow noreferrer"><code>GlazedLists</code></a> 1.8.0 and dropped it into Eclipse. However, I can't use it. I have red squares all over (except for the source folder)! I even added the jar file. </p> <p>I hope I have explained myself correctly. Please let me know if I need to expand.</p> <p>My Pastebin: <a href="http://pastebin.org/47044" rel="nofollow noreferrer">Name</a>, <a href="http://pastebin.org/47045" rel="nofollow noreferrer">Browser</a>, <a href="http://pastebin.org/47046" rel="nofollow noreferrer">TableFormat</a>, <a href="http://pastebin.org/47047" rel="nofollow noreferrer">TableModel</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload