Solved

Hide the Caret in TextArea ?

Posted on 1997-09-06
3
907 Views
Last Modified: 2012-06-27
does anybody knows a way to hide the caret in an TextArea (or
to change color of the caret) ???
I can use setEditable(false) to prevent for editing but the caret still shows up !!!
0
Comment
Question by:mos
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
borup earned 50 total points
Comment Utility
I do not think it is possible to remove the caret in the TextArea, but try this:

When the TextArea gets the focus you can remove the focus by setting the focus elsewhere in your applet. No focus, no caret!
0
 

Author Comment

by:mos
Comment Utility
What kind of component you are using if you just wanna
display text (with scrolling) without given the possibility
to modify ???
0
 
LVL 1

Expert Comment

by:borup
Comment Utility
Sorry. but I haven't heard about such a compenent. If you REALLY want to get rid of the caret, then you maybe should consider making your own compenent. But that is another question, and at that point I can't help you.

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
mapAB Challlenge 35 84
create a gui in perl 3 42
Java Server Faces parameter pass? 6 18
GUI builder for Eclipse? 8 7
For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
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…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will learn how to implement Singleton Design Pattern in Java.

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now