"Text Field question"

J

Javier

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
 
P

Patricia Shanahan

Javier said:
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
 
A

Andrew Thompson

Patricia Shanahan wrote:
.....
There is a different view, that as far as I can tell has never been the
subject of a vote,

I am alomst certain you are right there,
there has never been a formal vote to
ratify that comp.lang.java.help should
be reserved for Java beginners.

OTOH - I don't allow the lack of formal votes
get in the way of (what I see as) common sense.
...that holds that beginners should use
comp.lang.java.help, even when asking Java programming questions.

In the time I have been reading c.l.j.help, there have
been maybe 8-10 actual end-users asking how to
setup Java - the rest are new Java programmers.

As well, people do tend to ..
- be more patient
- explain in more detail
... on comp.lang.java.help

I highly recommend comp.lang.java.help for Java
programming beginners, and was considering making
a more concerted 'push' for its health (My past
experience suggests that if one in three people accept
my advice to post there - c.l.j.help becomes a thriving
group..).

Andrew T.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,234
Latest member
SkyeWeems

Latest Threads

Top