It is sometimes necessary to style individual words or characters of a text field. Examples include
1. Underlining invalid parts of input (misspelled words with a wavy underline for instance)
2. Emphasizing something as being a recognized entity such as a key as in: "Employee *234765*".
One way of doing this would be to allow support for the <span> tag as if the document model was HTML. This would allow me to decouple the styling into a .css file. Usage example:
messageTextField.setText("Let's go out <span class="misspelled>tonght</span>");
1. Underlining invalid parts of input (misspelled words with a wavy underline for instance)
2. Emphasizing something as being a recognized entity such as a key as in: "Employee *234765*".
One way of doing this would be to allow support for the <span> tag as if the document model was HTML. This would allow me to decouple the styling into a .css file. Usage example:
messageTextField.setText("Let's go out <span class="misspelled>tonght</span>");
- relates to
-
JDK-8097928 Add Formatted TextField control
- Resolved
-
JDK-8101503 Allow formatted text on a label
- Closed