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.

Page 2 of 2 FirstFirst 12
Results 26 to 29 of 29

Thread: How to change image when a key is pressed?

  1. #26
    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 change image when a key is pressed?

    Is the key listener method called? Add a println() to see.
    If you don't understand my answer, don't ignore it, ask a question.

  2. The Following User Says Thank You to Norm For This Useful Post:

    jerinjose61 (August 21st, 2014)

  3. #27
    Junior Member
    Join Date
    Aug 2014
    Posts
    16
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: How to change image when a key is pressed?

    Yippyyyyy!!!!! I got it!!! Sorry for the excitement!! But I just cant control it!! And THANK YOU very much Norm for your guidance!! Without you this would not have been possible. Thank you once again!!!

    --- Update ---

    The problem was I was pressing the key "1" to the right of my keyboard not the ones on top (the ones below the Function keys). Now the program runs super GOOD!! Thank you Norm!!!!

  4. #28
    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 change image when a key is pressed?

    Glad you got it working.
    If you don't understand my answer, don't ignore it, ask a question.

  5. #29
    Junior Member
    Join Date
    Aug 2014
    Posts
    16
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: How to change image when a key is pressed?

    All because of you!!!

Page 2 of 2 FirstFirst 12

Similar Threads

  1. [SOLVED] trying to change image by mouse click
    By leonne in forum What's Wrong With My Code?
    Replies: 6
    Last Post: January 5th, 2013, 08:16 PM
  2. KeyListener - how to make program react to the key that was pressed twice?
    By scorpas in forum File I/O & Other I/O Streams
    Replies: 3
    Last Post: November 28th, 2012, 08:19 AM
  3. Is Key Pressed statements
    By Yo Cas Cas in forum AWT / Java Swing
    Replies: 6
    Last Post: August 27th, 2011, 12:48 AM
  4. how to know user pressed a key in the keyboard
    By cilang in forum File I/O & Other I/O Streams
    Replies: 16
    Last Post: September 11th, 2009, 10:08 AM
  5. [SOLVED] Change the size of an image
    By subhvi in forum Algorithms & Recursion
    Replies: 4
    Last Post: August 23rd, 2009, 11:44 PM

Tags for this Thread