To search for some particular text in a table row, use Object obj = model.getValueAt(row, column) in a loop over all columns, and check whether obj matches the text you are looking for.
Fred Kleinschmidt wrote:To search for some particular text in a table row, use Object obj = model.getValueAt(row, column) in a loop over all columns, and check whether obj matches the text you are looking for.
Sorry, I'm a beginner in Java , you could not write the code for my the JTable , so that I could understand . Thank you.
Campbell Ritchie wrote:Please have a look in the Java™ Tutorials, which I think will help you.
In particular "Sorting and Filtering" is what you're asking about -- although going through the other parts of the tutorial would be very likely to prevent you from floundering around with code written using guesswork.
Why am I so drawn to cherry pie? I can't seem to stop. Save me tiny ad!