Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

urgent Jtextarea!!!!!!!

 
A Kumar
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Can u tell me how to make a Jtextarea as read only after i display some text in it..

Thnks in advance.
 
Axel Janssen
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how about:
setEditable(false)from JTextComponent.
JTextArea extends JTextComponent.
[ March 03, 2005: Message edited by: Axel Janssen ]
 
A Kumar
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks ..its working

I want multi lines of text..and am unable to get it..its
dispalying on single line ..what cud eb the problemm

Thnx once again....

jfunctiondesc=new JTextArea(5,10);
jfunctiondesc.setEditable(false);
jfunctiondesc.setBackground(bgColor);
jfunctiondesc.setTabSize(30);
jfunctiondesc.setText(description);
infoPanel.add(jfunctiondesc);
 
A Kumar
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes i got the method..


jfunctiondesc.setLineWrap(true);


This would work..


Thnx..
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!