Вопрос

I have a program with one panel on the right containing a BufferedImage that is very frequently updated and reapainted (using paintImediately()) and on the left are some buttons and JTextAreas. Often, when the BufferedImage is repainted, the buttons on the left are repainted with a portion of the image, obscuring their contents. How can I prevent this?

Here is the method I call that does the repainting:

void paintPlot() {
    plot.paintImmediately(0, 0, 1000, 1000);
}

I call it from a separate thread, if that is relevant.

Это было полезно?

Решение

It was answered in the comments. I needed to create this so I could mark the thread as closed.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top