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 2 of 2

Thread: Can't change value in JTextField

  1. #1
    Member
    Join Date
    Apr 2013
    Posts
    44
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Default Can't change value in JTextField

    Hello!

    I have two-dimensional array with JTextFields, c[9][9], and I also have a LinkedList, la, that contains Strings. I want to use this code in order to set the text in the JTextFields:

    c[0][0].setText(sa.getFirst());

    When I run that code nothing happens, and I can't figure out why.

    Hank


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,607
    My Mood
    Hungover
    Thanks
    145
    Thanked 658 Times in 563 Posts

    Default Re: Can't change value in JTextField

    That code will change the text of one of the JTextFields.

    If you want more help, you should provide an SSCCE that demonstrates what you're doing. Notice that this shouldn't be your whole program! Boil it down to the basics!
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. JTextField
    By DR_W in forum What's Wrong With My Code?
    Replies: 3
    Last Post: November 25th, 2013, 11:47 AM
  2. how to change DB design for a change in java
    By harry7ster in forum What's Wrong With My Code?
    Replies: 1
    Last Post: October 7th, 2013, 01:57 PM
  3. [SOLVED] JTextfield
    By usherlad in forum Java Theory & Questions
    Replies: 4
    Last Post: August 22nd, 2012, 12:24 PM
  4. JTextField
    By Karthik Prabhu in forum AWT / Java Swing
    Replies: 7
    Last Post: June 20th, 2012, 11:54 AM
  5. Get a certain line in a JTextField
    By FlamingDrake in forum Java Theory & Questions
    Replies: 2
    Last Post: May 14th, 2010, 04:21 PM