• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with Jtable

 
Saraswathy Krishnamoorth
Ranch Hand
Posts: 73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a Panel which has a JTable and "MakeReservation" button. For JTable the selectionModel is set to ListSelectionModel.SINGLE_SELECTION. The button "MakeReservation" is set as the default button. When the user selectes a row and presses enter, the cursor moves to the next row. Though "MakeReservation" button is set as default button. What should be done to make the makeReservation button be activated when user selects a row and presses enter. Please help. Thanks.
[ April 14, 2003: Message edited by: Saraswathy Krishnamoorth ]
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't worry about it. When the cursor is in the JTable, The Enter key will function as the JTable will handle it. You can always add a KeyListener to the JTable, but that isn't necessary.
Don't worry that the Enter key won't fire your Button's Action. It won't affect your grade on the assignment.
Mark
 
Saraswathy Krishnamoorth
Ranch Hand
Posts: 73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mark.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic