|
get numeric value from a text field
private int amount;
private amountTxt;
amountTxt = new JTextField(1);
c.add(amountTxt);
amount = amountTxt.getText();// i need the to use the value of amount below (price * amount)
JOptionPane.showMessageDialog(null, "Ticket price: €"+(price*amount)+".00"
Help would be appreciated thanks.
|