Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: is it impossible to make public javax.swing.JTextField Rank; hold a double value?!!!!

  1. #1
    Member
    Join Date
    Jun 2011
    Posts
    44
    My Mood
    Mad
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default is it impossible to make public javax.swing.JTextField Rank; hold a double value?!!!!

    i just want this to hold a value it has been holding me back for over a week and i cant figure it out!

    public javax.swing.JTextField Rank;

    please help me
    Last edited by copeg; June 11th, 2011 at 01:11 PM. Reason: Removed obsenity


  2. #2
    Super Moderator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,225
    Thanks
    176
    Thanked 817 Times in 760 Posts
    Blog Entries
    5

    Default Re: is it impossible to make public javax.swing.JTextField Rank; hold a double value?

    Shouting with exclamation points and typing obscenities will not get you help any faster. Further, your question doesn't make any sense. Do you just want to have a JTextField show a double? Use Double.parseDouble and String.valueOf to convert between doubles and Strings

  3. #3
    Member
    Join Date
    Jun 2011
    Posts
    44
    My Mood
    Mad
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: is it impossible to make public javax.swing.JTextField Rank; hold a double value?

    ok thank you now i need to get a double value that i just made using that one i just acquired into a jlabel OR text field so i need to make that double value into a string and i have no idea how to do that,

    my program is probably the simpilist ever and it's taking me weeks to make and i'm running down the home stretch with it so any and all help and pataince is very helpfull

    [i needed that other double to make a calculation to make this current double]
    Last edited by knoxy5467; June 11th, 2011 at 02:20 PM.

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    SW Missouri
    Posts
    20,067
    Thanks
    47
    Thanked 2,146 Times in 2,119 Posts

    Default Re: is it impossible to make public javax.swing.JTextField Rank; hold a double value?

    i need to make that double value into a string
    Read post #2. It gives methods for going each way.
    Look at the String class for methods to create Strings.
    Look at the Double class for methods to create doubles.
    Read the API doc for these classes: Java Platform SE 6

    Scroll down in the lower left window.

Similar Threads

  1. Replies: 6
    Last Post: January 28th, 2011, 12:13 AM
  2. Replies: 0
    Last Post: November 27th, 2010, 09:47 PM
  3. Error using public static double Method
    By stommy989 in forum What's Wrong With My Code?
    Replies: 5
    Last Post: October 13th, 2010, 03:01 PM
  4. Make some text bold, some NOT bold. JTextField
    By danny_felipe in forum Java Theory & Questions
    Replies: 2
    Last Post: May 27th, 2010, 06:44 PM
  5. [SOLVED] [Problem] imports javax.swing problem
    By Brollie in forum AWT / Java Swing
    Replies: 8
    Last Post: July 5th, 2009, 07:59 AM