Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTextArea Problem

 
raph1979
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi programmer experts!
I have a JTextArea that i just figured out how i can take each line of the JtextArea individually. These line are some path to a files. Example of what is in my JTextArea: C:\research\hello.doc
C:\research\demo.doc
My question is after saving these line, when i re-open this JtextArea, I want to allo the user to clic on the line of its choice to do some event, so how can i do this.
Thanks in advance
Raph
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wouldn't it be better to use a JList, or JComboBox? This sort of behavior is already built in...

-Nate

P.S. - Your name needs to follow the JavaRanch naming convention... Please re-register with a valid user name ( first name + space + last name ). Thank you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic