我有一個Java表和TableModel.each row(element)
有一個ID。我想顯示特定的ID。如何過濾這些元素?選定的ID可以更改。在java中顯示特定行JTable
例如:
public class L {
int id;
String name;
String family;
}
//----
private static final String[] columnNames = { "name","family"};
private static final Class[] columnClasses = {class.String.class,String.Class};
private Vector<L> list = Vector<L>();
list.add(new L(1,"A","b"));
.
.
.
list.add(new L(100,"AB","aa");
我想顯示與此ID的元件,例如{1 39 45 55 22}。
如何篩選這些ID?
http://stackoverflow.com/questions/1107911/how- can-i-filter-rows-in-a-jtable – jalopaba 2013-04-10 15:31:58
你確定你使用Class [] columnClasses = {Integer.class,String.Class}來覆蓋getColumnClass,以便更快地發佈[SSCCE](http ://sscce.org/),可短時間編譯 – mKorbel 2013-04-10 16:16:05