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: how to get information of jtextfield by using a jbutton in a loop

  1. #1
    Junior Member
    Join Date
    Jan 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question how to get information of jtextfield by using a jbutton in a loop

    in this way I can't initialize the (char)function.........
    this code is about a game which have 2 players so I have to get information from textfield for both players.......................But How????
    Attached Files Attached Files


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: how to get information of jtextfield by using a jbutton in a loop

    Have you solved this? The thread is marked as solved.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Jan 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: how to get information of jtextfield by using a jbutton in a loop

    Quote Originally Posted by Norm View Post
    Have you solved this? The thread is marked as solved.
    no I made a mistake to mark it as solved but I couldn't change it to pre-fix................
    I still have the problem and should solve it today............ it's very important to me.................

  4. #4
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: how to get information of jtextfield by using a jbutton in a loop

    I removed the [SOLVED] tag.

    Are you getting an error? If so, please post it, the entire thing, copied and pasted into a post as text, not a picture or attachment.

    Why is char function declared static?

    If the problem you're trying to solve is with the method function(), then post the Game class. Please post the code as text directly into a post, not as an attachment or a picture. Post the code in code or highlight tags as detailed here.

Similar Threads

  1. How do I make a jTextField display a value when a jButton is pressed?
    By idontknowhowtocode in forum AWT / Java Swing
    Replies: 0
    Last Post: December 12th, 2013, 02:17 PM
  2. Set JButton's mouse events to JTextField
    By startas in forum AWT / Java Swing
    Replies: 2
    Last Post: September 11th, 2013, 04:08 PM
  3. Replies: 4
    Last Post: April 6th, 2013, 05:13 PM
  4. Using jbutton to write to jtextfield values to database
    By Sociopath in forum What's Wrong With My Code?
    Replies: 5
    Last Post: May 23rd, 2011, 10:53 PM
  5. [SOLVED] how can i resize JTextField, JButton using GridBagLayout,... TNX
    By sny in forum AWT / Java Swing
    Replies: 0
    Last Post: March 4th, 2010, 09:57 AM

Tags for this Thread