• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

two object transparent

 
pandya devarshi
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can make a object transparent?
Suppose in my applet two object is available.One is front object which is smaller than then the backend object.and front object is motion object.
when front object move from one point to the another point it is occupy the some space of the backend object,as result i can n't see the occupied portion of the backend object but i can see the unoccupy portion of the backend object.How can see the unoccupy portion of the backend object.


Regards
Devarshi
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.
but i can see the unoccupy portion of the backend object. How can see the unoccupy portion of the backend object.

I'm assuming you meant to say "How can see the occupied portion of the backend object.", correct?

If those are objects painted by your code, then you'll need to change your code so that an object in front does not cover an object farther back. Maybe instead of painting it in solid color, only paint the lines that make up its outline.

I'll move the topic to the AWT/Swing forum, since there is nothing applet-specific about the question.
[ September 04, 2008: Message edited by: Ulf Dittmer ]
 
Campbell Ritchie
Sheriff
Posts: 51343
86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried the JComponent#setOpaque(boolean) method?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic