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.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Help With Double Buffering/Animations

  1. #1
    Join Date
    Jun 2011
    My Mood
    Thanked 8 Times in 8 Posts

    Default Help With Double Buffering/Animations

    I have turned my interests towards expanding my Java knowledge of game animating and logic. There is one problem however...

    I don't know how to use Double Buffering (and the internet has not been too useful) nor the best way to go about animating graphics.

    The only animating I have done thus far is using different frames and a Thread.sleep(x) call. However, that is certainly not adequate for a game where the player is controlling how the graphical environment behaves.

    So for starters...

    1. Can anyone elaborate the "Double Buffering" method for me? It seems logically important in creating smooth animations without the flashes.
    2. Share your favorite method of animation if you have experience in that area.

  2. #2
    Forum old-timer
    Join Date
    Nov 2008
    Faversham, Kent, UK
    My Mood
    Thanked 58 Times in 54 Posts

    Default Re: Help With Double Buffering/Animations

    Swing automatically enables double-buffering - see Double Buffering Support. If you use the framework correctly, you shouldn't have problems with flashing.

    If you want full control over screen painting for performance, you could try active rendering (although this requires full-screen exclusive mode). See Passive vs Active Rendering.

Similar Threads

  1. [SOLVED] Read double from console without having to read a string and converting it to double.
    By Lord Voldemort in forum File I/O & Other I/O Streams
    Replies: 3
    Last Post: June 26th, 2011, 08:08 AM
  2. [SOLVED] Flash animations inside a Java program
    By chronoz13 in forum AWT / Java Swing
    Replies: 1
    Last Post: May 18th, 2011, 03:43 AM
    By relixus in forum AWT / Java Swing
    Replies: 3
    Last Post: October 3rd, 2010, 10:55 PM
  4. Double Buffering
    By Ganezan in forum Java Theory & Questions
    Replies: 2
    Last Post: November 20th, 2009, 03:51 AM
  5. Replies: 1
    Last Post: April 1st, 2009, 02:47 PM