• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Problem with Jtable

 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Mark.
reply
    Bookmark Topic Watch Topic
  • New Topic