Now finishing my custom menu popup, but the problem is that if I select some text in JTextField
and click mouse button to show popup menu, then focus is transferred to popup window, AND selected text before are no longer highlighted. When focus is back to JTextField
- selected text become highlighted again. How to make the selected text stay highlighted on focus lost?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
you can to override DefaultCaret for JTextComponents
you can to override Highlighter for JTextComponents
code example from DefaultCaret
with output
from code
EDIT have to restore Caret.setBlinkRate(500);