• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

detect mouseclick of jtable if column renderer is also a jtable

 
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This
http://forums.sun.com/thread.jspa?forumID=57&threadID=737501
or may be this
http://forums.sun.com/thread.jspa?forumID=57&threadID=606900

may help

Regards,
Stas
 
mark goking
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic