Skip to main content
gamedev.net
🔒 Locked

[java] Flickering programa only at start (Java)

Started by alessandro_ 1 reply 850+ views
Original Post
alessandro_
alessandro_
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
Zahlman
Zahlman
Moving to Java Development.
Stani R
Stani R
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()

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.