Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

draw rect problem?

nick cheng
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
public void paint(Graphics g) {
if (!buffered){
buffer = createImage(50, 50);


bufferG.drawRect(0, 0, (int) imageSize.getWidth(),
(int) imageSize.getHeight());

in this Applet file ,i set the background colour is "black" in void init()
,then i set some images one the surface,and last i use double buffer draw a rect image,but when i draw the image,the rect become ,a black solid rect ,how to make it become tranparent?
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic