• 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: 17309
11
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.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!