This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin for Android App Development and have Peter Sommerhoff on-line!
See this thread for details.
Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Compositing every component on Component?  RSS feed

 
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What i've got so far is a component which is set on a layeredPane, this component fades in and out when activated or triggered. The problem is that I can't figure out how to alter the composite of each component, the only thing which is being affected is the background ( which fades in and out as it should ). The individual components themselves simply appear and disappear. Here is the code so far...



Any ideas would be great. I assumed I had to get the graphics object for each component on this component, yet when I did that it didnt work, so I assume I'm missing something.
 
Chris Dancy
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I eventually found the answer to my problem...or at least how to approach it and come out with the answer. Here is the link in case anyone else is interested...

http://forums.sun.com/thread.jspa?threadID=5379385&tstart=0
 
Marshal
Posts: 62842
203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well done

You ought to have said (as you did on the other forum) that you were posting elsewhere.
 
Chris Dancy
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes..... I posted elsewhere after I did not get a response here. I was under a bit of time constraint and was looking for a solution rather quickly or at least how to approach a possible solution. And I found the answer. And if anyone comes across this and does not want to read the link...This is what I did. In the Panel or component which holds a number of components that all need to be composited in some fashion it's actually quite simple, and I'm kicking myself for not thinking of it sooner. Simply over ride paintChildren(g), then set whatever composites or whatever on that graphics object and pass that graphics object back up with super.paintChildren(g). And wala... everything is as it should be. Easy as pie.
 
Campbell Ritchie
Marshal
Posts: 62842
203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for telling us the solution. It is helpful to know in case somebody else has a similar problem in the future.
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!