Results 1 to 2 of 2
  1. #1
    Jcbconway is offline Senior Member
    Join Date
    Sep 2010
    Posts
    109
    Rep Power
    0

    Default JText area help?

    Ok, so my problem earlier was solved, and now, i am trying to find out if there is a way to use int's (integers) and display them opposed to displaying strings? so, TF.setText("Hello"); that would print hello, but is there a way to do something like TF.setText(number); where number is int number = 5; so it would print 5?

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,321
    Rep Power
    25

    Default

    See the Integer class for methods to convert int values to Strings.
    There is a trick that will have the compiler do it for you. Code ""+99 to create a String: "99"

Similar Threads

  1. Looking for a Web GUI Developer (D.C. area)
    By rclark in forum Jobs Offered
    Replies: 0
    Last Post: 12-16-2009, 05:18 PM
  2. Area problem
    By rfore1 in forum New To Java
    Replies: 7
    Last Post: 12-10-2009, 10:14 PM
  3. eol in text area....
    By Nicholas Jordan in forum Networking
    Replies: 0
    Last Post: 09-14-2008, 10:59 PM
  4. Area Add
    By Java Tip in forum java.awt
    Replies: 0
    Last Post: 06-22-2008, 11:07 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •