简体   繁体   中英

How to Set Text To a disabled JTextArea

I want some help on how to paste a copied String to a disabled JTextArea .

I'm trying to do:

Input.copy();
ExprTextArea.paste();

Where input is the String to be copied and ExprTextArea is the element which the copied String must be pasted.

try this

ExprTextArea.append("Text"); //append will work in this Case.

because setText() Method will not work because of Disabled.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM