Hi everyone,
I need some help.
I have a program that creates a window with JTexboxes on it and a button. The user is to fill in the textboxes and press the button. When this occurs the program is to retreive the information from the textboxes and then insert it into a database. I used getText() to get the information from the textboxes. That works fine. But when i press the button to send it to the database it gives me an error "NumberFormatException" and then the contents of the textbox in question. Everything seems to be fine. I get the information as a String pass it to the method as a string. Then when i send it to the database I use parseInt() to change it to an Integer because the format of the database column is int(11). I don't know why it is giving me this error. Another funny thing that is happening is that it gives me the error only when i fill in the next following textbox which is also an Integer. Here is the code:

public void UpdateData(String sex,String account,String id,String fname,
String lname,String birth,String age,String street,
String city,String province,String pc,
String medical,String hphone,String cphone,
String email,String momfname,String momlname,
String dadfname,String dadlname,String level,
String hours,String timefrom,String timeuntil,
String fee) {

String s=sex;
String acc = account;
String ident = id;
String first = fname;
String last = lname;
String birthday = birth;
String ageyear = age;
String streetaddr = street;
String cityname = city;
String prov = province;
String post = pc;
String med = medical;
String phone1 = hphone;
String phone2 = cphone;
String emailaddr = email;
String mfirst = momfname;
String mlast = momlname;
String dfirst = dadfname;
String dlast = dadlname;
String levelname = level;
String thour = hours;
String tfrom = timefrom;
String tuntil = timeuntil;
String feecost = fee;

if ((s.equals("m"))||(s.equals("M"))){
String data = "jdbc:mysql://localhost:3306/athletes";
try {
Class.forName("com.mysql.jdbc.Driver");
Connection conn = DriverManager.getConnection(
data, "root", "naofumi");
Statement st = conn.createStatement();
st.executeUpdate("INSERT INTO Male" +
"VALUES ('"+Integer.parseInt((String)acc)+"'"+
",'"+ident+"'"+
",'"+s+"'"+
",'"+last+"'"+
",'"+first+"'"+
",'"+birthday+"'"+
",'"+Integer.parseInt((String)age)+"'"+
",'"+streetaddr+"'"+
",'"+cityname+"'"+
",'"+prov+"'"+
",'"+post+"'"+
This one triggers it -> ",'"+Integer.parseInt((String)med)+"'"+
This one gets the error -> ",'"+Integer.parseInt((String)phone1)+"'"+
",'"+Integer.parseInt((String)phone2)+"'"+
",'"+emailaddr+"'"+
",'"+mlast+"'"+
",'"+mfirst+"'"+
",'"+dlast+"'"+
",'"+dfirst+"'"+
",'"+levelname+"'"+
",'"+Integer.parseInt((String)thour)+"'"+
",'"+tfrom+"'"+
",'"+tuntil+"'"+
",'"+Float.parseFloat((String)feecost)+"');");
st.close();
} catch (SQLException sq) {
System.out.println("SQL Error: " + sq.toString() + " "
+ sq.getErrorCode() + " " + sq.getSQLState());
} catch (Exception e) {
System.out.println(" Error: " + e.toString()
+ e.getMessage());
}
}

This is the crucial part of the program so if anyone can help please do.