This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

row is selected just clicking on row of a table  RSS feed

 
arun singhal
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Clearly..
I have created a table have row and column...
I want that when i only click on any row of table then it print that row is selected..
As an example table have 10 rows.. and when I click on 2 row then it print that 2 row is selected...
 
Rob Camick
Ranch Hand
Posts: 2800
15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use a MouseListener. Then use methods from the JTable to convert the mouse point to a row in the table.

 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!