Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

detect mouseclick of jtable if column renderer is also a jtable  RSS feed

 
mark goking
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi. id like to ask for ideas on how to detect a mouseclick on a jtable's column if its cellrenderer/editor is also a jtable

thing is, clicking on other columns works ok. but if the column's renderer/editor is a jtable, id have to click on it once to have the focus on it, then click again so that the inner jtable's cell editing will start

if i could capture the mouse click on that column, i can call editCallAt() manually
 
Stanislav Lapitsky
Ranch Hand
Posts: 53
 
mark goking
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi stanislav.

i did a temporary fix by adding a focuslistener on the table cell editor JTable

and using the table.getMousePosition() , id determine if the cursor is on a cell, activating editCellAt() in the process
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!