Results 1 to 3 of 3
- 06-23-2010, 10:03 AM #1
Member
- Join Date
- Jun 2010
- Posts
- 5
- Rep Power
- 0
jtable setrawselectioninterval problem
Hello everyone
i need help in following problem
i have create one jtable with data in jpanel,
and i have put FIND functionality , when we press find button it ask input
EXAMPLE
if one of the cell of Jtable contain "yatin" value AND IF I HAVE PROVIDE INPUT IN FIND TEXTBOX AS "yatin" it dark the row of the jtable using this method setRowSelectionInterval of jtable,
when i update the jtable and same find procedure follows , i not get raw selection
please help me
- 06-23-2010, 01:11 PM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,394
- Blog Entries
- 7
- Rep Power
- 17
Try this one: first you set a sorter on your table:
Given a JTextField that contains the wanted value add a filter to your sorter:Java Code:table.setRowSorter(sorter= new TableRowSorter<YourTableModel>(yourModel));
That's all there is to it ...Java Code:sorter.setRowFilter(RowFilter.regexFilter(field.getText()));
kind regards,
Jos
- 06-24-2010, 07:24 AM #3
Member
- Join Date
- Jun 2010
- Posts
- 5
- Rep Power
- 0
Similar Threads
-
JTable problem
By sandeepsai39 in forum New To JavaReplies: 2Last Post: 06-27-2009, 06:15 AM -
Problem With AI and JTable
By elad_bj in forum New To JavaReplies: 8Last Post: 04-20-2009, 02:24 PM -
JTABLE problem
By MaximInf in forum AWT / SwingReplies: 4Last Post: 06-21-2008, 10:45 AM -
Jtable duplicates through Hashtable (JTable condition problem) my assignment plz help
By salmanpirzada1 in forum Advanced JavaReplies: 2Last Post: 05-15-2008, 10:15 AM -
Problem with JTable
By Felissa in forum AWT / SwingReplies: 2Last Post: 07-04-2007, 09:25 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks