Reputation: 3161
What I'm trying to achieve is a JTextField
with a JTable
on the bottom, every time a change occurs on the JTextField
(type or delete a character) the JTable
would update showing the results from it's list of strings that match what is written on the JTextField
, and showing all results if empty.
What I don't know how to do :
Upvotes: 1
Views: 1646
Reputation: 205785
Add a DocumentListener
to your JTextField
. Update the TableModel
belonging to your JTable
with matches. The JTable
will update itself in response.
Upvotes: 1