I have a bit of a silly question. I have been thinking about it for a while!
If I wanted to give the impress that the program was typing in real time, as in, you see the letters appear one by one, pause at the end of a line, see the program hit enter twice, perhaps even a blinking cursor thrown in... how would you do it?
I'd imagine at the most basic level, you could just put text into a string and have it output character by character with a timer between each output that is very minimal so it gives the impression of typing. Simply pack the command for output within a while loop, and set the while integer to the same number of characters in the string. (I simplified this sentence immensely--I know.)
But is there an easier way to manage this?
Again, this is just curiosity.
Also, similar to system(cls) in C++, is there a "clear the console" function that I should be aware of that will wipe the slate clean once it hits that line?
As for the console clearing, that is also interesting... How about a way of clearing an output screen? Say, for example, I wanted only text that has been input in the last 5 minutes to display. Are there way to clear out text older than 5 minutes if I have the program making a check, say, every 10 seconds or so?
You're asking the same question, again. Its not straightforward to clear the cmd console. Just Google and you'll found the lots of link/posts discussing the same.
BTW, what's your need, can you try using Swing component.