• 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

Problems with keymap (sortcut keys) with JTable..

 
Ranch Hand
Posts: 127
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

hello,guys
'm facing problem..
i want to edit default Enter click event on JTabel row to when user clicks entre on row new dialog should be poped up ..
and one more key event on[ LEFT_ARROW_KEY +CTRL ] click Last column of current row should be visible.

below is code i tryied but action is never generated on jtable..

 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If that's the actual code for the action, then how can you even tell if it's being called? The GUI does nothing, but isn't that exactly what the action says it will do?

But yes, there is a flaw. InputMap doesn't do anything by itself. It has a companion, ActionMap. The InputMap values are keys for the ActionMap. This allows one single action to be shared by multiple key strokes; you add the action to the ActionMap once with a specific key, and add all key strokes to the InputMap with the same key. Change your code to this:
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic