Win a copy of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 this week in the Programmer Certification forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Issue to textArea

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
How to attach textArea to mainPanel below?
 
Saloon Keeper
Posts: 6419
60
Eclipse IDE Firefox Browser MySQL Database VI Editor Java Windows
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

 
HuaMin chen
Ranch Hand
Posts: 62
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Why do I get the attached, when running your current codes?
3p.png
[Thumbnail for 3p.png]
 
Carey Brown
Saloon Keeper
Posts: 6419
60
Eclipse IDE Firefox Browser MySQL Database VI Editor Java Windows
 
HuaMin chen
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to originally disable any edit against such Textarea?
 
Rancher
Posts: 3078
24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read the JTextArea API.

There are methods that allow you to control is the text area is "editable" or "enabled".

You choose which property you want to set to false based on your requirement.

 
HuaMin chen
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, any example to achieve that?
 
Marshal
Posts: 66237
250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you read the documentation?
 
HuaMin chen
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, but I cannot find out a clear example to change Editable property of it.
 
Carey Brown
Saloon Keeper
Posts: 6419
60
Eclipse IDE Firefox Browser MySQL Database VI Editor Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sometimes you don't get examples. What you get is the documentation on what methods are available and how to use them.
 
HuaMin chen
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do the Listener disable Editable property?
 
Carey Brown
Saloon Keeper
Posts: 6419
60
Eclipse IDE Firefox Browser MySQL Database VI Editor Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Docs: JTextArea
Note that JTextArea has no direct method setEditable() but JTextArea inherits from JTextComponent which does. No Listener involved.
 
HuaMin chen
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Current Text area is editable. Is there any other straightforward way to make it non-editable?
 
Campbell Ritchie
Marshal
Posts: 66237
250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Didn't Carey answer that question last week?
 
Beware the other head of science - it bites! Nibble on this message:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!