Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Repaint transparent BufferedImage

 
Jochem Gruter
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my applet I make use of different bufferedimages and use them as a screen part. Each screenpart will only be repainted when the content needs to change. This is the abstract class of a 'screenpart'



But the buffer doesn't work because the buffer is also transparent. It will work when I change the bufferedimage type of the buffer from ARGB to RGB but this displays also a black background. So my question is: how can I correctly repaint this bufferedimage with a buffer?
 
Darryl Burke
Bartender
Posts: 5149
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jochem Gruter wrote:Each screenpart will only be repainted when the content needs to change.

I don't see any code that attempts to change the image in any way. I also don't see the point of painting a new BufferedImage (buffer) of the same size to the BufferedImage that this class represents at the time of construction.

Perhaps a typical implementation of the abstract paint(...) method, along with a sample of how the method is called, and where the passed-in parameter is obtained, would help clarify the question. In other words, an SSCCE <- link
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic