Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem in reading the panel and mouse events  RSS feed

 
GnanaPrakasam Rathinasabapathi
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
Can anyone help me for the following problem. I need to use mouse listener event on the Text panes that are created dynamically. I need to read the text from the clicked textpane and display it. I am getting the text from the last textpane in any pane i click.Please help.My code goes here..

i need your help. Please guide me to use the mouse events.Thanks in advance.
Regards,
Gnanaprakasam
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perhaps you want to use the MouseEvent's getSource() to get a reference to the actual JTextPane that was clicked. From there you can get its text.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!