How do you use an integer type with JOptionPane.showInputDialog

2003-12-20 05:02:06 PM
Im a beginner here :) Im trying to have the user input an do you do this? It seems whatever is inputted into the
InputDialog box is a there a way to change the data type
for this command? This is my piece of code:
int invQty;
invQty = JOptionPane.showInputDialog (null, "What is the quantity of
\"" + invName + "\"?","Enter Quantity", JOptionPane.QUESTION_MESSAGE);