A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Java
»
Beginning Java
Author
About fading text in regular System.out.println form
Klaas Vredevort
Greenhorn
Joined: Dec 27, 2005
Posts: 29
posted
Mar 03, 2006 15:26:00
0
How do I make a reqular piece of
String
fade in and out?
Klaas
marc weber
Sheriff
Joined: Aug 31, 2004
Posts: 11343
I like...
posted
Mar 03, 2006 15:54:00
0
Originally posted by Klaas Vredevort:
How do I make a reqular piece of String fade in and out? ...
The destination of the standard output stream (e.g., a Windows Command Prompt) does not normally provide this functionality.
There are, however, crude ways to make something on a line blink...
class Blinker { public static void main(String[] args) { for(int x = 0; x < 8; x++) { try { System.out.print("\rBlinking"); Thread.sleep(500); System.out.print("\r........"); Thread.sleep(500); } catch(Exception e) { System.out.println("Exception: " + e); } } System.out.println("\rDone blinking."); } }
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award."
~Joe Strummer
sscce.org
I agree. Here's the link:
jrebel
subject: About fading text in regular System.out.println form
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter