If you wanted to write a program in java that uses a JFrame to simulate the falling green code from the matrix movie using ascii string characters so it looks exactly like this php example
what would be the best way of doing it? labels, drawString? etc...
I know that within a for-loop for example you could use the integer value i to decrease the y-axis values, darken the color setColor(new Color(255, 255 - (i * 5), 255));
but i don't know how you would leave the "imprint" behind.
thanks
解决方案
This example shows how to fade text using alpha transparency, while this example illustrates how to fade text by varying the color saturation.
Addendum:
What would be the best gui layout to use?
I'd solve the problem in a single, columnar JPanel that is as wide as the chosen Font and arbitrarily tall. Use a javax.swing.Timer to control animation. Then use a new GridLaylout(1, 0) to contain any number of such columns as a single row.