Results 1 to 3 of 3
  1. #1
    elenora is offline Member
    Join Date
    Apr 2011
    Posts
    30
    Rep Power
    0

    Arrow How to draw a cursor for a String

    Hi,
    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?
    :o

  2. #2
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,765
    Blog Entries
    7
    Rep Power
    21

    Default

    Don't implement that all by yourself; a JTextField can be a solution.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    elenora is offline Member
    Join Date
    Apr 2011
    Posts
    30
    Rep Power
    0

    Default

    thanks, but I must to draw chars in a Canvas, because I want to draw some pics and ....!
    now could you help me How can I do it please?

Similar Threads

  1. change the mouse cursor - crosshair cursor
    By cassysumandak in forum New To Java
    Replies: 1
    Last Post: 09-28-2009, 02:57 AM
  2. Draw String in Rectangle
    By DavidG24 in forum AWT / Swing
    Replies: 3
    Last Post: 05-20-2009, 08:05 AM
  3. How to Draw Unicode String in Java
    By Java Tip in forum java.awt
    Replies: 0
    Last Post: 06-24-2008, 12:15 AM
  4. Cursor
    By serfster in forum New To Java
    Replies: 2
    Last Post: 06-15-2008, 06:49 AM
  5. Using a cursor
    By notnumber6 in forum New To Java
    Replies: 3
    Last Post: 11-26-2007, 11:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •