Question

I am stuck in a very bad situation Kindly help.

My requirement :

  • In a text area I will be replacing a String with a value Eg.. Original text :James Bond acted in Skyfall

  • I need to change 'James' alone, with a Tag {CTPC-1} then it will be displaying like " {CTPC-1} Bond acted in Skyfall" this is done dynamically.. when I select the next string it will be incremented {CTPC-2} etc..

  • after replacing it.. the tag "{CTPC-1}" alone should not be editable others i.e "Bond acted in Skyfall"should be in editable format

    I need to do this in java swings kindly help me

Était-ce utile?

La solution

Check out the Protected Text Component. It will allow you to specify pieces of text that can't be deleted and can also highlight this text.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top