aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Problems with keymap (sortcut keys) with JTable.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Problems with keymap (sortcut keys) with JTable.." Watch "Problems with keymap (sortcut keys) with JTable.." New topic
Author

Problems with keymap (sortcut keys) with JTable..

Piyush Patel
Ranch Hand

Joined: Feb 24, 2009
Posts: 127


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..



[My Blog] [ Follow @Twitter] | Innovations never goes out of Style...
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19538
    
  16

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:


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problems with keymap (sortcut keys) with JTable..
 
Similar Threads
JTable remove rows trouble.
JTable ........
jtable
JRadioButton in JTable
JTable