The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

How to code "check button"

Hello,
I am not sure if this is a right place for my question, but i will be thankful if u answer it.
I am making desktop application calling "Pharmacy application" in NetBeans. Since I am amateur, this is a simple application, with these functions:
-log in
-products
-product sell
-product purchase
-recipes
...etc.

My big problem is to code product sell. The idea is when user type product ID in text area and when he click at check button, he will get information if there is such product in database and he shows him in table (jTable), and if there is not to, it will show the message "There is no product...".untitled4.JPG