For some reason the searching isn't comparing strings right, according to my debugging they should be, something else must be wrong?
The actual search method when user clicks search
This is called before doSearch on button event too:
It should be adding the rows from String[][] tData that meet the comparison...
The actual search method when user clicks search
Code:
//SEARCH RECORDS
private void doSearch()
{
int rows = 0;
String search = tSearch.getText();
int index = cbSearch.getSelectedIndex();
String iSearch = "";
for(int i=0;i<tData.length;i++)
{
iSearch = tData[i][index];
if (iSearch.indexOf(search) > 0)
{
model.insertRow(rows,tData[i]);
rows++;
}
}
}
Code:
if(source == bSearch)
{
rc = model.getRowCount();
for(int i=(rc-1);i>-1;i--)
{
model.removeRow(i);
}
doSearch();
}
Comment