Francesco Sollazzi
Francesco Sollazzi

Reputation: 434

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.

Upvotes: 1

Views: 278

Answers (1)

Vikrant Kashyap
Vikrant Kashyap

Reputation: 6876

try this

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

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

Upvotes: 1

Related Questions