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: Linking Button with the text field

  1. #1
    Junior Member
    Join Date
    Aug 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Linking Button with the text field

    I want to enter the value corresponding to a button in the already created text field like that in a calculator, when we add 1 it shows 1. How to do this??


  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: Linking Button with the text field

    Add a listener to the button. In the listener get the value to add from the button that was pressed and add it to the textfield.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. validating java text field
    By payal in forum AWT / Java Swing
    Replies: 1
    Last Post: July 24th, 2012, 12:41 AM
  2. Create a JText field upon button click
    By jo15765 in forum AWT / Java Swing
    Replies: 3
    Last Post: May 28th, 2012, 07:06 PM
  3. Parsing from a GUI text field
    By jdubicki in forum AWT / Java Swing
    Replies: 6
    Last Post: May 17th, 2012, 03:46 PM
  4. Replies: 3
    Last Post: April 11th, 2011, 09:51 PM
  5. Replies: 3
    Last Post: February 21st, 2011, 07:25 PM