This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes detect a line in a jtextarea Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "detect a line in a jtextarea" Watch "detect a line in a jtextarea" New topic

detect a line in a jtextarea

Gizzmo Zeuzere
Ranch Hand

Joined: May 11, 2001
Posts: 45
when i find a "{" i want to know the line where it appears. But i don't know how to do. Help please !!!
Angela Lamb
Ranch Hand

Joined: Feb 22, 2001
Posts: 156
Use the getLineOfOffset(int�offset) function. The offset parameter will be the position of the '{' within your text.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: detect a line in a jtextarea
It's not a secret anymore!