Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • 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: 20893
81
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!