淡入和淡出的Java小程序的效果 [英] Fade in and fade out effect in java applet
问题描述
我提出这个Java applet的图形节点和边。我想要实现淡入和淡出的时候单击一个节点的新节点的检索效果,但我不知道怎么写和执行code。
为了澄清,例如动物节点检索虎狮节点。因此,当动物被点击连接到它逐渐消失和虎狮节点逐步显现。节点和边缘
I am making this java applet graphics with nodes and edges. I want to implement the fade-in and fade out effect on retrieval of the new nodes when one node is clicked, but I don't know how to write and implement the code. To clarify, for example animal node retrieves tiger and lion nodes. so when animal is clicked the node and the edge attached to it gradually fades away and the tiger and lion nodes gradually appear.
感谢您提前
推荐答案
这<一个href=\"http://stackoverflow.com/questions/2228735/how-do-i-fade-an-image-in-swing/2234020#2234020\">example使用的AlphaComposite
做的衰落。或者,本<一href=\"http://stackoverflow.com/questions/2123841/javax-swing-timer-repeats-fine-but-actionlistener-doesnt-do-anything/2124507#2124507\">example构成基于饱和度的颜色表。
This example uses AlphaComposite
to do the fading. Alternatively, this example composes a color table based on saturation.
这篇关于淡入和淡出的Java小程序的效果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!