It should. Thanks! Maybe you also know about the following: there's a method createPosition(int) in the Document interface. I use it to track changes to my custom links in the document. Is it possible to disable the tracking part in certain cases (i.e., it would stay unchanged)? When I type something after the link, the endLinkPosition pointer changes incorrectly and screws up the whole logic. I don't know how to control this. Thanks.
-----Original Message----- From: DK [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 21, 2002 1:06 PM To: Reinstein, Lenny Subject: Re: Making parts of Text component uneditable. Override the inserString and remove method of your Document.Check if you are inserting ,removing at a place where u want uneditable . Hope this helps. "Reinstein, Lenny" wrote: > Difficult to explain in a short email. In general, I have a text component > in the applet that contains a lot of text. I want to disallow users to make > changes to certain portions of the text. > > Basically, I have a component that displays links defined by XML, and we > store the links (start, end) in a Collection associated with the component > and diplays the links in the component (JTextPane) by just marking them as > blue/underlined. So, I want to make sure the users never type inside the > links or modify them after they have been created. > > The question remains: is it possible to make a piece of text in the text > component uneditable while the component is editable? > > -----Original Message----- > From: Greg Munt [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 21, 2002 11:46 AM > To: Reinstein, Lenny; [EMAIL PROTECTED] > Subject: Re: Making parts of Text component uneditable. > > What are you trying to do? > > ----- Original Message ----- > From: "Reinstein, Lenny" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, May 21, 2002 3:57 PM > Subject: Making parts of Text component uneditable. > > > There's a simple setEditable(boolean) that make the whole JTextComponent > > uneditable. However, I would like to make only parts of text in the > > component uneditable. Is it possible? Thanks. > > > > -Lenny, New York. > > > > _______________________________________________ > > Advanced-swing mailing list > > [EMAIL PROTECTED] > > http://eos.dk/mailman/listinfo/advanced-swing > > > > _______________________________________________ > Advanced-swing mailing list > [EMAIL PROTECTED] > http://eos.dk/mailman/listinfo/advanced-swing _______________________________________________ Advanced-swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/advanced-swing
