This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes frame buffering Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "frame buffering" Watch "frame buffering" New topic

frame buffering

not -Mc

Joined: Jul 08, 2010
Posts: 1
first i initialise the onscreen frame when the program starts and then copy the empty frame buffer

then i write all my graphics to the buffer frame in my draw() method at the end of which the buffer frame is copied to the onscreen frame.

but then if i set frame to = buffer, wont it become invisible too, so i need to reapply visibility which causes the frame to flash between visible and invisible.

I feel like i'm doing it completely wrong, any suggestions for this newb?
Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

Hi, welcome to the ranch ! Please check your private messages for an important administrative matter.

[My Blog]
All roads lead to JavaRanch
Rob Spoor

Joined: Oct 27, 2005
Posts: 19908

buffer and frame both refer to the same JFrame object.

How To Ask Questions How To Answer Questions
I agree. Here's the link:
subject: frame buffering