Bd Howard wrote:When you say my MB instance should have an Image field, do you mean a BufferedImage since that is what I make, or do I convert the BufferedImage to an Image? Can I just do a cast here? I chose a BufferedImage because I did not like how the image was drawn, line by line.
I guess with SwingWorker setting the Image inside done(), I don't have a need to use a BufferedImage.
Isn't a BufferedImage more efficient though? Or am I mixing apples and oranges here?
I may be misunderstanding something, but what is the difference between publish() and setProgress()? Can I pick one of those to use, or do I need to use both? If I use publish(), is my code for the JProgressBar/Dialog inside the process() override? Or does that lead to another multiple creation of dialog problem? The more I read in the JavaDoc, the more I think I need only setProgress() for this particular program since I am using the loop counter as my "percentage complete".
BufferedImage extends Image
Bd Howard wrote:The paintComponent(Graphics g) override needs that Graphics g. When I construct my BufferedImage in another class, do I also need the Graphics object I used to draw that BufferedImage to be sent back to the paintComponent()? Or will the Graphics g inside the paintComponent work with that static BufferedImage that is set from the done() in my SwingWorker thread of that other class? I do the cast to Graphics2D.