Hello everybody, I am new to Java, I am creating a simple application that will insert into my database, but what I really want is, I have a class called product which contains the jTextfields of the product description and product qty and a button called test, and I also have another class called insert class which contains the code to insert into the database.
My main problem here is, I created a method called insertBotton in the insert class and in the product class i called the insertBotton method and it is suppose to insert any data entered in that product description and product qty Jtextfields into the database, the problem here is it will pass an empty field to the insert class making it to have an error saying
java.lang.NumberFormatException: For input string: ""
Just want my insert code to be in a different class so i can call it anytime i want
Please you guys should help me solve this problem
You can download the files from http://www.maxinville.com/bucky.zip
*the project files (Created with Netbeans)
Database username: java
product.java and insert.java are the 2 main files to work with and in the Product Class you use the test button to work all other buttons are working well except the test button where i want the action to be.