How to draw a cursor for a String
I want to draw a String in the graphic rectangle and to shift to right or left the String in the rectangle I ‘m using a stack, for example when I want to shift the String to the left, I pop the last character of this String from the stack and push into another stack, …. Now my problem is how can I draw a curser for the String in Java? For example I want that after I enter a character, the cursor must be moved! Could anyone help me How can I do this in Java?