Results 1 to 3 of 3
  1. #1
    Doctor Cactus is offline Member
    Join Date
    Oct 2008
    Posts
    63
    Rep Power
    0

    Default [SOLVED] Line Highlighting

    Hi, I have a JTextArea and i want to highlight a certain line. For example, i want to highlight line 14 in the text area. How do i do this?
    Help is greatly appreciated.

  2. #2
    Doctor Cactus is offline Member
    Join Date
    Oct 2008
    Posts
    63
    Rep Power
    0

    Default

    OK, so the highlighting works if I click on a line in the JTextArea :). But i want the mouse cursor to move to a certain line number and then highlight. I have heard about the Robot class, but this is for screen coordinates. So, how would I move the mouse cursor to a certain line number in a JTextArea?

  3. #3
    Doctor Cactus is offline Member
    Join Date
    Oct 2008
    Posts
    63
    Rep Power
    0

    Default

    I have solved my line highlighting problem :D
    No replies other than my own :mad::mad::mad::mad::mad:
    Anyway, Thread solved :cool:

Similar Threads

  1. how do i remove this line?
    By eyal1983 in forum NetBeans
    Replies: 6
    Last Post: 01-01-2009, 02:55 AM
  2. New line character
    By mew in forum New To Java
    Replies: 3
    Last Post: 12-14-2007, 06:24 PM
  3. Reading in data from file line by line
    By bluekswing in forum New To Java
    Replies: 1
    Last Post: 10-02-2007, 12:19 AM
  4. Help with Drawing a line
    By Rgfirefly24 in forum New To Java
    Replies: 1
    Last Post: 08-06-2007, 08:40 AM

Posting Permissions

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