Results 1 to 12 of 12
  1. #1
    justbeller is offline Member
    Join Date
    Dec 2010
    Posts
    57
    Rep Power
    0

    Post Problem in JtextArea

    hello every one
    I have problem in Jtextarea that how can I use go to line in Jrextarea
    i wanna go to direct on line.

    please any body know solution then share it here plz

    thanks in Advance

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

  3. #3
    justbeller is offline Member
    Join Date
    Dec 2010
    Posts
    57
    Rep Power
    0

    Default

    I created a editor in java like notepad I wanna give an option of "goto line number" user enters the number & cursor will point on that line
    thats it...

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,298
    Rep Power
    20

    Default

    See the API for javax.swing.text.Utilities and javax.swing.text.Caret

    db

  5. #5
    justbeller is offline Member
    Join Date
    Dec 2010
    Posts
    57
    Rep Power
    0

    Default

    Thank u I got It...
    Last edited by justbeller; 07-24-2011 at 02:36 PM.

  6. #6
    justbeller is offline Member
    Join Date
    Dec 2010
    Posts
    57
    Rep Power
    0

    Default

    I have another problem can I share it...

  7. #7
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Location
    Richmond, Virginia
    Posts
    3,069
    Blog Entries
    3
    Rep Power
    8

    Default

    Of course, what's the problem?

  8. #8
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,298
    Rep Power
    20

    Default

    If it's unrelated, start a new thread.

    db

  9. #9
    justbeller is offline Member
    Join Date
    Dec 2010
    Posts
    57
    Rep Power
    0

    Default

    No its also about JTextArea

    the problem is i wanna set Highlighter on entire row of jtextarea mean it follows the cursor position where cursor point the complete row will highlight like netbean, eclipse where we righting code entire row is highlighted...

    i hope u understand what i'm saying...

  10. #10
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Quote Originally Posted by justbeller View Post
    No its also about JTextArea

    the problem is i wanna set Highlighter on entire row of jtextarea mean it follows the cursor position where cursor point the complete row will highlight like netbean, eclipse where we righting code entire row is highlighted...

    i hope u understand what i'm saying...
    Despite it being about JTextArea, it's a completely different issue; so I too recommend that you start a new thread on this.

  11. #11
    camickr is offline Senior Member
    Join Date
    Jul 2009
    Posts
    1,236
    Rep Power
    7

    Default

    Thank u I got It...
    Hmm, I'm not aware of any method from the Utilities class that would help you find the row offset for a given line number. Perhaps you could post the code you used.

    In the meantime, Text Utilities Java Tips Weblog shows the code that I use.

  12. #12
    justbeller is offline Member
    Join Date
    Dec 2010
    Posts
    57
    Rep Power
    0

Similar Threads

  1. Problem in JTextArea
    By justbeller in forum AWT / Swing
    Replies: 6
    Last Post: 02-15-2011, 03:02 PM
  2. Problem with JTEXTAREA
    By javanew in forum New To Java
    Replies: 6
    Last Post: 05-07-2010, 02:14 PM
  3. JTextArea problem
    By javanew in forum AWT / Swing
    Replies: 2
    Last Post: 05-04-2010, 10:31 PM
  4. jfilechooser and jtextarea problem
    By kostinio in forum AWT / Swing
    Replies: 7
    Last Post: 10-07-2009, 08:46 AM
  5. Jtextarea Content Display Problem
    By REVANSIDDHA in forum Advanced Java
    Replies: 1
    Last Post: 03-31-2009, 06:53 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
  •