You have to call the method of the
PreparedStatement
:
a.st = a.con.prepareStatement(query);
a.st.setString(1.moth, DateTextField.getText());
Note also that the parameter
1.moth
is not a valid integer and might generate another error after fixing the initial one.