File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Insertion  in JTextArea Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Insertion  in JTextArea" Watch "Insertion  in JTextArea" New topic
Author

Insertion in JTextArea

P Jain
Ranch Hand

Joined: Jul 31, 2004
Posts: 52
Hi!
I have a JTextArea which has some strings(each string in new line).
I clicks at some location in JTextArea after this I click one Button.I want to insert a text by button click on the next line of the location where I last click the mouse(in JTextArea).

lets the contents of JTextArea is

Cricket
FootBall
Tennis

when I click on the line of FootBall and then clicks on button then text "Text" should be inserted as

Cricket
FootBall
Text
Tennis


How I can do that.


Regards<br />P Jain
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
P Jain
Ranch Hand

Joined: Jul 31, 2004
Posts: 52
Hi!
Thanks its working.................
 
Consider Paul's rocket mass heater.
 
subject: Insertion in JTextArea
 
Similar Threads
Indian cricket - IPL
JTextArea
[Cricket] New coach for India
[cricket] Aus v the World
how about cricket as olympic sport?