I've got just enough Java knowledge to royally screw everything up. :-)
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
I've got just enough Java knowledge to royally screw everything up. :-)
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".
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
BufferedImage extends Image
![]()
I've got just enough Java knowledge to royally screw everything up. :-)
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
I've got just enough Java knowledge to royally screw everything up. :-)
luck, db
There are no new questions, but there may be new answers.
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.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
I've got just enough Java knowledge to royally screw everything up. :-)
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
I've got just enough Java knowledge to royally screw everything up. :-)
I've got just enough Java knowledge to royally screw everything up. :-)
I've got just enough Java knowledge to royally screw everything up. :-)
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
I've got just enough Java knowledge to royally screw everything up. :-)
Wait for it ... wait .... wait .... NOW! Pafiffle! A perfect tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|