Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Punx409

[java] Fading in a JPanel?

This topic is 5898 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How would I fade a JPanel to specified RGB value? I was hoping I wouldn''t have to alter each individual pixel, since I have no idea how to. Would someone be able to help me?

Share this post


Link to post
Share on other sites
Advertisement
if you just want to fade it in a single colour, then i''d just do a fillRect() within a loop and change the colour a little after each fill.

if you want to fade an image or something i guess you have to change each pixel over and over againt.

(however, i think there is something in Graphics2D that might do the trick, not sure though)

_______________________
http://mill.3dfxsweden.net

Share this post


Link to post
Share on other sites
Well you could write your own gui....

I have been for a while now with all my own blitting & drawing methods as a real time custom gui is what the Chaoslab2 is gonna need.

It is an extreme option though

:-)

Share this post


Link to post
Share on other sites
Doing it pixel by pixel is going to be *very* slow. That''s my guess, anyway. Is there anyway to set the gamma correction of an image in Java? This would be another way.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!