Re: "Text Field question"
Javier wrote:
Hello,
I am new to this group and I am not sure if this is the one that a
beginner Java programmer should use, if it is not, please I would like
somebody to tell me so. If this group is ok for beginners I would like
to ask something, how can I display a numerical value in a JTextField,
I know that method void setText() display a string, and that I should
parse the numerical value to a string, but I am not sure how to do it.
I looked in the API, but in the JTextField class I do not find anything
that could give me a clue.
Thank you
Javier
There is some disagreement about beginners in this newsgroup. My view is
that the subject, as voted on when the group was created, is Java
programming. Your question is obviously a question about Java
programming, not a miscellaneous question about e.g. setup, so I think
it belongs here.
There is a different view, that as far as I can tell has never been the
subject of a vote, that holds that beginners should use
comp.lang.java.help, even when asking Java programming questions.
The key to effective use of Java API's is putting together pieces to
make what you want.
You know how to get a string into your JTextField. Now consider,
completely separately, the question of how to get your number
represented as a string. The number wrapper classes, Integer etc., have
toString methods for that purpose.
Patricia