By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,541 Members | 1,109 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,541 IT Pros & Developers. It's quick & easy.

cursor movement

P: 3
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!!!
Nov 30 '06 #1
Share this Question
Share on Google+
4 Replies


10K+
P: 13,264
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!!!
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.
Dec 1 '06 #2

P: 3
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.
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 terminates
Dec 1 '06 #3

10K+
P: 13,264
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 terminates
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.
Dec 1 '06 #4

P: 3
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.
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...
Maybe you 're right...
Thanks for your time!
Dec 2 '06 #5

Post your reply

Sign in to post your reply or Sign up for a free account.