This week's book giveaways are in the Jython/Python and Object-Oriented programming forums. We're giving away four copies each of Machine Learning for Business: Using Amazon SageMaker and Jupyter and Object Design Style Guide and have the authors on-line! See this thread and this one for details.
What I'm doing is double buffering my GUI app, basically rather than calling JPanel.repaint() I've created a BufferedImage and am drawing directly to it and then just calling Graphics.drawImage(Image, int, int, ImageObserver) my JPanel's Graphics object. This of course prevents me from simply adding the delivered swing widgets to my JPanel. Is there a way I can extract the Image of a widget so I can just add it to my BufferedImage? Calling JComponent.creatImage() on these widgets only seems to give me an empty image object.
When you break the big rules, you get a lot of little rules.
The reason why I'm doing it is avoid IO slow down. It takes a while for the JComponent to send updated images to the screen one widget at a time. With the BufferedImage, I update only what I want and all I want all at once with just one call to the screen.