This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Disable EnterKey action for JTextArea Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "Disable EnterKey action for JTextArea" Watch "Disable EnterKey action for JTextArea" New topic
Author

Disable EnterKey action for JTextArea

Damithri Warnakulasuriya
Greenhorn

Joined: Apr 18, 2008
Posts: 17
Hi All,
Is anyone knows, how to disable enter key for JTextArea?

If someone types something in a JTextArea and presses Enter key, then cursor goes down (Starts a new line).
What I want is to disable that action and cursor should be as it is without moving to a new line when user presses the enter key.

Please help me.

Thank you
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
http://www.coderanch.com/t/415962/GUI/java/JtextArea
Damithri Warnakulasuriya
Greenhorn

Joined: Apr 18, 2008
Posts: 17
Oh Thank you very much for the early reply. Thanks for the help as well.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Disable EnterKey action for JTextArea
 
Similar Threads
JSF form: using ENTER as TABULATOR key
TextArea and ActionEvent
Automatic indentation
jtextpane help
disabling ENTER key