Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Is there a way to disable JTextArea from keystrokes?

Posted on 2000-04-24
6
Medium Priority
?
678 Views
Last Modified: 2008-03-03
I have a JTextArea which I am using to display messages only, is there a way to disable any typing on it?

Theta.
0
Comment
Question by:theta
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 4

Expert Comment

by:adam923
ID: 2746044
call the method setEditable(false) on the jtextarea
0
 
LVL 2

Expert Comment

by:venkat2000120699
ID: 2746338
U can as well call setEnabled(false).
0
 
LVL 4

Expert Comment

by:adam923
ID: 2746357
please revert your answer to a comment... it amounts to the same thing that i said, just 2.5 hours later

setEditable and setEnabled would both work just as well... there are subtle differences but none that you'll notice in a simple application
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:rjackman
ID: 2746493
or u can use JTextArea.setEnable(false);
which will cause Jtextarea to be disbled totally
RJackman
0
 

Author Comment

by:theta
ID: 2748038
adam923 I am rejecting venkat2000's answer, change your comment to an answer so that I can accept it.

Thanks.
Theta.
0
 
LVL 4

Accepted Solution

by:
adam923 earned 100 total points
ID: 2748359
i can't change my comment to an answer but you can....
or i'll just submit this as the answer, it's all the same
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question