Search form with Jtable

I created a form with a textbox ,Jtable and a button. When the user inputs data into the textbox and press the button, the related data should appear in the jtable. Im not sure on the best way to do it. All of my data is in mysql.
[237 byte] By [toyewamidea] at [2007-11-26 14:09:27]
# 1
So what is your problem exactly?Do you know how to write an ActionListener?Do you know how to add hard coded data to a JTable?Do you know how to create and execute an SQL statement and display the resulting values?
camickra at 2007-7-8 1:56:30 > top of Java-index,Desktop,Core GUI APIs...
# 2

I know how to use action listener. I know how to display query data into a jtable when you open the form. I followed the example on: http://www.netbeans.org/kb/articles/mysql-client.html

. I just want to be able to input data into the textbox, press the textbox and have information related to what i typed into the textbox displayed on the jtable.

toyewamidea at 2007-7-8 1:56:30 > top of Java-index,Desktop,Core GUI APIs...
# 3

I still don't understand the problem.

> I know how to use action listener.

Then add the ActionListener to the text field

> I know how to display query data into a jtable when you open the form.

Well you build the model the same way. A query is a query. So once you've built your TableModel from the ResultSet you simply do:

table.setModel( modelYouJustCreated );

camickra at 2007-7-8 1:56:30 > top of Java-index,Desktop,Core GUI APIs...
# 4

you can build a tablemodel by extending DefaultTableModel. and if your using hibernate or something simliar, you can pass in your result lists into your table model, and reference them in the getValueAt method. or like camickr said, just pass your resultset into your table model, or build it using your resultset. lots of ways to do it. your question is too generic, be more specific as to what excatly you need help with.

llpindda at 2007-7-8 1:56:30 > top of Java-index,Desktop,Core GUI APIs...