When I use setText()
on the textfield it wont allow me to do so because what i want in there is an int
, i would change the int to a string but int's are needed to do further calculations.
How can I get set the text of a JTextField
with an int
.
private void setAllTextFields(MenuItem m){
desBox.setText(m.getDescriptions());
priceTF.setText(m.getPrice());
calsTF.setText(m.getCalories());
}
price and calories are the numbers
thanks