我如何定义Java JEditorPane使其能够始终从用户读取文本,包括单击按钮后的内容,现在当我键入文本并单击屏幕上的某些按钮时,我需要再次单击JEditorPane以便能够输入更多文本。
Looks like the problem is lost focus. You can make the button not focusable
theClickButton.setFocusable(false);
Or return focus to the JEditorPane in the end of the button's action
editorPane.requestFocus();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.