title: How to get value as integer from JTextField in swing?
body: <p>Actually i'm using oracle jdbc type4 thin driver. And I'm creating registration form in swing with eclipse with following columns pid,name,addrs.
  the problem is i'm getting only string value which method is <code>ps.setString=(2,JTextfiled.getText());</code>
  but i'm not able get int value like <code>ps.setInt(1.getxxx());</code> 
  can anyone guide me how to insert int value to database.</p>
  
  <pre><code>//prepare query
  String query1 ="insert into employee values(?,?,?,?,?)";
  //create preapare Statement
  ps = con.prepareStatement(query1);
  //set params
  ps.setString(1,textField.getText());
  ps.setString(2, textField_1.getText());
  ps.setString(3, textField_2.getText());
  ps.setString(4,textField_3.getText());
  ps.setString(5, textField_4.getText());
  //execute query
  int count = ps.executeUpdate();
  if(count==0)
  {
      JOptionPane.showMessageDialog(null, "Record not Inserted");
  }
  else
  {
      JOptionPane.showMessageDialog(null, "Record inserted into database successfuly");
  }
  </code></pre>