That sounds a good idea. Could you give me some code help?


>From: "Borchardt, Brett" <[EMAIL PROTECTED]>
>Reply-To: "JDJList" <[EMAIL PROTECTED]>
>To: "JDJList" <[EMAIL PROTECTED]>
>Subject: [jdjlist] Re: Line numbers
>Date: Mon, 1 Jul 2002 17:52:18 -0500
>
>I recently did something like this.  The approach I took was to add a
>JTextPane to a JPanel with a wide left margin and then override the paint()
>method in the JPanel to draw the line numbers in the margin using
>Graphics.drawString().  You can then add the panel to a JScrollPane to get 
>a
>scrolling text pane with line numbers.
>
>Brett
>
> > -----Original Message-----
> > From: Panagiotis Plevrakis [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, July 01, 2002 5:32 PM
> > To: JDJList
> > Subject: [jdjlist] Line numbers
> >
> >
> > I'm trying to implement visible line numbers in a code
> > editor. I don't want
> > the numbers to be part of the code. So, my first approach is
> > to create a
> > JTextArea to the left of the main editor area that will
> > listen to the text
> > length changes and display the appropriate sequence of line
> > numbers. If
> > someone has done something similar or has any ideas to give
> > me, I would
> > appreciate it.
> >
> > Panos
> >
> > _________________________________________________________________
> > Send and receive Hotmail on your mobile device: http://mobile.msn.com
> >
> >
> > To change your membership options, refer to:
> > http://www.sys-con.com/java/list.cfm
> >
>
>To change your membership options, refer to:
>http://www.sys-con.com/java/list.cfm




_________________________________________________________________
Join the world�s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


To change your membership options, refer to:
http://www.sys-con.com/java/list.cfm

Reply via email to