• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getting focus out of jTable

 
Reshma Das
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have my booking details beneath the JTable. When user presses TAB on last row, last col i want to take the foucs out of JTable to the reservation textfiled.
someone pls let me know the api for that
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well there are KeyListeners that you can use, but there is also ListSelectionListener. You need to create a class that implements one of these interfaces, provide the necessay method, get the Jatable make sure they are already on the last row, if it is, call the requestFocus() method of the component you want to grab the focus.
That is the overview, the specific details you will need to look at the api to get.
If not, then don't implement that, you won't get docked points if you don't have it tab out of the JTable.
Mark
 
Reshma Das
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Mark iam not sure how to implement it iam going to ignore it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic