This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
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
 
 
subject: Pressing Enter on JTable, Not jumping to Next Row