You don't need a BufferStrategy or VolatileImage unless you are doing live
animation. It was hard to tell from your message if that was the case.
I usually use a BufferedImage that you get from createCompatibleImage and draw
using Java2D to the graphics context you get from it. When the plot
Use the Canvas if you need hardware double-buffering badly enough that you're
willing to deal with the Z-ordering issues that you get from mixing Swing and
AWT widgets. Otherwise, use a JPanel. You cannot use a Canvas inside of a
JScrollPane, for one thing.
Rendering outside of the event
Do you get reasonable animation with this method?
How many frames a second do you get using invokeLater()?
[EMAIL PROTECTED] wrote:
You don't need a BufferStrategy or VolatileImage unless you are doing live
animation. It was hard to tell from your message if that was the case.
I usually use
Looking at some BufferStrategy examples, it seems that the pattern is to do
rendering in a timed loop, something like this:
[code]
// Render loop
while (!done) {
Graphics g = strategy.getDrawGraphics();
render(g);
g.dispose();
strategy.show();
try {
Thread.sleep(100);
}
I recommend using something similar to the Foxtrot API. It is not recommended
to perform time intensive processes in the event queue.
[Message sent by forum member 'bcorbett8769' (bcorbett8769)]
http://forums.java.net/jive/thread.jspa?messageID=301665
Well, lets clarify/assume a few things.
You have some data source, constantly producing data, right? While that data
source happily produces data the user is also looking at a representation of
that data, right? And the user can interactively select (scrolling, zooming)
which portion of the
Hi,
I'm trying to build a little program that draws complicated time-consuming
plots. I'd like to avoid having my UI freeze up while I'm rendering, so I don't
want to do the rendering on the event dispatch thread. So, what's the modern
(well, Java 5 level of modern) way of doing this?
First,