inserting to a sql table using java setText() method values

   String sql="Insert into daily_ot (date,empNo,ot1hrs,ot2hrs,ot1amt,ot2amt) values (?,?,?,?,?,?)";
         try{
            pst=conn.prepareStatement(sql);
            pst.setString(1, ((JTextField) date.getDateEditor().getUiComponent()).getText());
            pst.setString(2,com_emp.getSelectedItem().toString());
            pst.setString(3, txt_ot1.getText());
            pst.setString(4,  txt_ott2.getText());
            pst.setString(5, txt_ot1_amt.getText());
            pst.setString(6, txt_ot2_amt.getText());                       
             pst.execute();

 }catch(Exception e){

             JOptionPane.showMessageDialog(null, e);

 } 
  finally{
            try{
                rs.close();
                pst.close();
            }
             catch (Exception e){

            }
        }

I used this java code to insert into the daily_ot table in sqliteManager. Here the values are not keyboard inserted. The values are taken as the setText() method values set in previous methods. But the code doesn’t work for setText() method values. but when inserted using keyboard it works. could someone please help in this .