This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

disable Jtable row-navigation with keyboad (but it should be on with mouse)  RSS feed

 
sarveshwar singh
Greenhorn
Posts: 13
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ,

I have a very simple JTable ... i just want to stop the default property of row navigation(row selection change) on keyboard, but row should be selected when its clicked with mouse.

Thanks ,
Sarveshwar Singh.
 
Rob Spoor
Sheriff
Posts: 21044
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Swing components uses key binding for almost all keyboard interactions. You can view and modify these using InputMap and ActionMap. In this case, get the InputMap for the JTable, check out which key strokes it has, and remove the ones you don't want.
 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
... but I would hate to be a user of your application.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!