I am creating and updating a BufferedImage on a background thread. The image is then drawn onto a JPanel by overriding the panels paint method as shown.
@Override
public void paint(Graphics g) {
g.drawImage(image, 0, 0, null);
}
The background thread periodically updates the image then calls the panels invalidate method.
Will I run into any issues with this approach? Will the swing thread reading and the background thread updating the image cause any problems?
Thanks
Ben