Sign in to follow this  
alessandro_

[java] Flickering programa only at start (Java)

Recommended Posts

Hi Firstly, sorry if my English isn't very well. Perhaps my problem it's of a newbie, but it's causing me trouble. I'm finishing a desktop game in java (not an applet, but a normal window). The dynamics of the game is as follows: first of all, the game shows a presentation screen a few seconds (a .png). After doing that, the game shows the menu buttons (start, options, exit). I'm using swing and awt. The question is that I'm not able to remove flickering in the presentation screen, before the options. Furthermore, the bug isn't reproducible: sometimes it doesn't flicker, sometimes it flickers once, and sometimes it's flickering during all the presentation (4 or 5 seconds). Once the buttons are shown the it never flickers, and I suspect that it's due a problem when I fill the buffer, but really I don't know. If you could help me, I'd very thankful. Regards: Alejandro

Share this post


Link to post
Share on other sites
To me it sounds like a problem with double buffering, although in Swing it should be automatic (I'm not too familiar with Swing rendering). Post the code you use to draw that presentation screen and the buttons. Also check that your root pane isDoubleBuffered()

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this