cursor movement

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • RedDevil
    New Member
    • Nov 2006
    • 3

    #1

    cursor movement

    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!!!
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by RedDevil
    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.

    Comment

    • RedDevil
      New Member
      • Nov 2006
      • 3

      #3
      Originally posted by r035198x
      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

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        Originally posted by RedDevil
        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.

        Comment

        • RedDevil
          New Member
          • Nov 2006
          • 3

          #5
          Originally posted by r035198x
          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!

          Comment

          Working...