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: JPanel flickering

  1. #1
    Junior Member
    Join Date
    Apr 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default JPanel flickering

    Hi

    I am developing quite a big application which uses several JPanels to display different data at different times. I create all panels in the beginning to make for a faster change of panels. I simply use setVisible to show and remove a panel but when i do that between some of them the screen flickers. Is there a way to double buffer them or so to fix this? I am quite experienced in java although not in using Swing/awt
    I hope someone can help.


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: JPanel flickering

    JPanels are by default double buffered. I'm unclear where the flickering takes place...which is where posting an SSCCE would help demonstrate what exactly you are doing (often but not always flickering is due to painting outside of the paintComponent method, but again an example would clarify)

Similar Threads

  1. Java swing buttons are flickering in windows 7 environment
    By javasam in forum Member Introductions
    Replies: 1
    Last Post: February 17th, 2011, 09:51 AM
  2. Java swing buttons are flickering in windows 7 environment
    By javasam in forum AWT / Java Swing
    Replies: 1
    Last Post: February 14th, 2011, 12:13 PM
  3. How to use the same variable in various JPanel?
    By danielpereira in forum What's Wrong With My Code?
    Replies: 1
    Last Post: September 19th, 2010, 12:08 PM
  4. How to copy image from one jpanel to another jpanel
    By ramanavarayuri1986 in forum AWT / Java Swing
    Replies: 0
    Last Post: February 15th, 2010, 02:36 AM
  5. Creating and displaying a JPanel inside another JPanel
    By JayDuck in forum AWT / Java Swing
    Replies: 1
    Last Post: April 7th, 2009, 08:02 AM

Tags for this Thread