I\'m trying to set an int value using jTextField and the setText method. But of course setText wants a String. How do I get round this? I\'ll give you a snippet of the code:
Normal ways would be
seatsTF.setText(Integer.toString(e.getNoOfSeats()));
or
seatsTF.setText(String.valueOf(e.getNoOfSeats()));
but, this can be achieved with a concatenation like this:
seatsTF.setText("" + e.getNoOfSeats());