Results 1 to 2 of 2
  1. #1
    chyrl is offline Senior Member
    Join Date
    Mar 2010
    Location
    Manila, Philippines
    Posts
    257
    Rep Power
    5

    Exclamation How to include a line number in a Text Area

    Greetings,

    How would I implement this to a text area component (like JTextArea, or JEditorPane) wherein each line a encode; there exists a line counter the increments with respect to the number of lines in the text area?

    Can you help me determine what classes, methods, implementation I am to utilize to have this output.

    To clearly visualize this, this is similar to the line counter of some IDEs (Netbeans, Eclipse, etc.).

    Thanks,
    Cyril H.
    Every project, package, class, method, variable, syntax, algorithm, etc.
    are registered in my memory bank. Thanks to this thread.

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,003
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by chyrl View Post
    Greetings,

    How would I implement this to a text area component (like JTextArea, or JEditorPane) wherein each line a encode; there exists a line counter the increments with respect to the number of lines in the text area?

    Can you help me determine what classes, methods, implementation I am to utilize to have this output.

    To clearly visualize this, this is similar to the line counter of some IDEs (Netbeans, Eclipse, etc.).

    Thanks,
    Cyril H.
    Camickr, the Swing wizard has a nice entry on exactly this topic.

    kind regards,

    Jos

Similar Threads

  1. [SOLVED] How to get text area to line up with label.
    By Nicholas Jordan in forum AWT / Swing
    Replies: 8
    Last Post: 12-28-2010, 12:21 AM
  2. Replies: 0
    Last Post: 09-28-2010, 09:52 AM
  3. Replies: 0
    Last Post: 08-06-2010, 05:40 PM
  4. under line text area data
    By anilkumar_vist in forum New To Java
    Replies: 1
    Last Post: 02-25-2010, 03:37 PM
  5. [SOLVED] Text Area new line problem
    By Jay-1.1 in forum New To Java
    Replies: 3
    Last Post: 05-07-2008, 04:18 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
  •