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

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top