I have made a small application in java. I want to insert supplier payment in mysql database.Now the issue is when i try to subtract total balance with total payment and enter in balance column. so it give me error like java.lang.NumberFormatException: For input string: "396.00" so how i can solve it
if(jCheckBox1.isSelected())
{
String bx="Insert into supplierpaymenttable(Supplier_ID,SupplierInvoice_I D,User_ID,InvoiceNo,TotalAmount,PaymentAmount,Rema iningBalance) VALUES (?,?,?,?,?,?,?)";
PreparedStatement pay=conn.prepareStatement(bx);
int k=Integer.parseInt(jTextField5.getText());
int cx=k-k;
pay.setString(1,String.valueOf(supplier));
pay.setString(2,String.valueOf(det));
pay.setString(3,"1");
pay.setString(4, String.valueOf(invoie));
pay.setInt(5, Integer.valueOf(jTextField5.getText()));
pay.setInt(6, Integer.valueOf(jTextField5.getText()));
pay.setInt(7,Integer.valueOf(cx));
int rsdets= pay.executeUpdate();
}