aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JTextArea and Tab problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTextArea and Tab problem" Watch "JTextArea and Tab problem" New topic
Author

JTextArea and Tab problem

Ranganath Junpal
Ranch Hand

Joined: Aug 31, 2006
Posts: 76
i am having a problem with JTextArea. when i say tab it just gives a Tab space instead of focusing the next component.
Secondly i want to know how to wrap text in JTextArea..

please let know..

Regards
sammaiah kyatham
Ranch Hand

Joined: Aug 03, 2003
Posts: 104
Hello,
Whenever you type tab, It will focus some other component. That's the existing functionality. If you want space you should override the existing functionality of the component. add keyAdapter to your text area and capture tab key event and do whatever you want.

regarding wrapping of text, just have lookat java API

http://java.sun.com/j2se/1.4.2/docs/api/

setLineWrap(true) method helps you to wrap the text.


Cheers,
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTextArea and Tab problem
 
Similar Threads
help on accessing the component in the tab Pane
JTextArea & Cursor
Issues with JTextArea as cellEditor of JTable Column.
Turning off Tab traversal in a JTextArea
JTabbedPane default component focus in tab panels