wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes Pressing Enter on JTable, Not jumping to Next Row Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Pressing Enter on JTable, Not jumping to Next Row" Watch "Pressing Enter on JTable, Not jumping to Next Row" New topic
Author

Pressing Enter on JTable, Not jumping to Next Row

Jeff Holmes
Ranch Hand

Joined: Oct 04, 2000
Posts: 44
I have a JTable that a user can select only one row and non of the fields are editbale, it is to display data only. I have the enter key captured when user presses a key, and I display a dialog when enter is pressed. Everything works great, but how do I stop the default behavior of the return key not causing the jTable to go to the next line? Any ideas? Thanks, Jeff
 
GeeCON Prague 2014
 
subject: Pressing Enter on JTable, Not jumping to Next Row