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: imageicon set frame position

  1. #1
    Junior Member
    Join Date
    Jul 2020
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default imageicon set frame position

    helo,

    anyone know if their is a way to set an imageicon frame to zero (or frame one) after it has animated and is not set to loop?

    i know my clip file i can do this with

    		if (wolfobject.wolfatack.getFramePosition() == wolfobject.wolfatack.getFrameLength()) {
    			wolfobject.wolfatack.setFramePosition(0);
    		}

    for example if my wolf in my wolf list has an atacking sound i can reset it after it has played to be played again

    thank you,

    nathan

  2. #2
    Junior Member
    Join Date
    Jul 2020
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: imageicon set frame position

    i gues i can use a timer and repeated loop is not that bad

Similar Threads

  1. Update JLabel with new ImageIcon
    By iHank in forum AWT / Java Swing
    Replies: 5
    Last Post: February 6th, 2014, 09:36 AM
  2. set ImageIcon position to a specific coordinates (x , y)
    By nosxlimit in forum AWT / Java Swing
    Replies: 3
    Last Post: July 29th, 2012, 09:58 AM
  3. Replies: 1
    Last Post: January 19th, 2012, 03:44 PM
  4. Help with ImageIcon
    By nivangerow in forum What's Wrong With My Code?
    Replies: 18
    Last Post: August 30th, 2011, 10:39 AM
  5. The Frame to be Center Position
    By r12ki in forum AWT / Java Swing
    Replies: 3
    Last Post: October 1st, 2009, 10:36 AM