Article View: borland.public.jbuilder.java.swing
Article #8587A Line Numbered Textarea????
From: Nikolaos Giannopoulos
Date: Wed, 09 Aug 2000 00:00
Date: Wed, 09 Aug 2000 00:00
31 lines
1442 bytes
1442 bytes
Hi, I am looking for a way to accomplish the following 102 the blah, blah, blah, blah, blah, 103 blah, blah, blah, blah, blah, blah, 104 blah, blah, blah, blah, blah, blah, 105 blah, blah, blah Basically I want the line numbers on the left to be read only and to not be an editable part of the text area. On the right of the numbers I want free text that wraps around. Hitting an enter on line 103 should give something like: 102 the blah, blah, blah, blah, blah, 103 blah, blah, bl 104 ah, blah, blah, blah, 105 blah, blah, blah, blah, blah, blah, 106 blah, blah, blah The two ideas I had were: (1) To use a JEditorPane and somehow customize its painting of its contents (2) Use a JSplitPane with two text areas and try to have the line numbers keep in synch with changes to the main text text area. ANY IDEAS ANYONE???? Any help is extremely appreciated.... --Nikolaos
Technical Details
Message-ID:
<3991D1FE.C75B2C12@solmar.ca>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,dd46b099d16a9668,start X-Google-Attributes: gid111d45,public From: Nikolaos Giannopoulos <nikolaos@solmar.ca> Subject: A Line Numbered Textarea???? Date: 2000/08/09 Message-ID: <3991D1FE.C75B2C12@solmar.ca> X-Deja-AN: 656517009 Content-Transfer-Encoding: 7bit Organization: Another Netscape Collabra Server User X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing