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

Was it helpful?

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top