Hi all! I'm new to java programming and I'm trying to find how to move the cursor to a specific point (right after the execution), instead of flashing at the end of the line "Press any key to continue...". Thanks in advance guys!!!
cursor movement
Collapse
X
-
Are you talking about at the console? If you are then the moment you see the Press any key to continue, it means that your program has exited and you can no longer control the screen output using your java program because the program is probably no longer in memory and is no longer executing.Originally posted by RedDevilHi all! I'm new to java programming and I'm trying to find how to move the cursor to a specific point (right after the execution), instead of flashing at the end of the line "Press any key to continue...". Thanks in advance guys!!! -
I'm talking about a command at the end of the program which will move the cursor to a specific point (x, y), before the program terminatesOriginally posted by r035198xAre you talking about at the console? If you are then the moment you see the Press any key to continue, it means that your program has exited and you can no longer control the screen output using your java program because the program is probably no longer in memory and is no longer executing.Comment
-
You cannot refer to console co-ordinates. You only output lines of text to the console. Also remember that java does not have a trivial clear screen like you have in c/c++. You do not have a caret object for the console like you do for JTextAreas and other text components because the console belongs to your OS and java cannot directly manipulate it.Originally posted by RedDevilI'm talking about a command at the end of the program which will move the cursor to a specific point (x, y), before the program terminatesComment
-
So you 're telling me that my teacher is 'playing' with us, because he promised extra bonus for writing a typical program which would have the cursor at the top of the screen...Originally posted by r035198xYou cannot refer to console co-ordinates. You only output lines of text to the console. Also remember that java does not have a trivial clear screen like you have in c/c++. You do not have a caret object for the console like you do for JTextAreas and other text components because the console belongs to your OS and java cannot directly manipulate it.
Maybe you 're right...
Thanks for your time!Comment
Comment