Find a Matching Text in JTable
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Mike_Patel
Posted On:   Monday, April 16, 2001 11:03 AM

Hello,
I need to implement a Search functionality in a Swing GUI that uses table to display the data.
Can you pls inform me with the necessary APIs.
Thanks in advance,

Re: Find a Matching Text in JTable

Posted By:   sachin_l  
Posted On:   Monday, April 16, 2001 02:59 PM

getRowCount to count the number of rows u have to search

for loop(int i ,i getObjectAt(i,ColumnToSearch) compared with searchString specified

Use String class API combination for comparison
equals -> for whole word and match case
equalsIgnoreCase -> for whole word and no match case
indexOf -> for partial string search
About | Sitemap | Contact