I have two JTables in a splitpane and below I have a row of buttons. My problem is: how do I know what table the user is working on? (ie when the user hits the delete button to delete a table row)? Can it be solved without using global variables?
It's the button that has focus. I have tried with transferFocusBackward() and transferFocusDownCycle() but it didn't work.
posted 12 years ago
i'm not sure, but i think anything to do with transfering focus will use the component tab-order, not a 'last-visited' cycle..
you could try using a Stack. you could push breadcrumbs onto the stack in your listener. when delete btn is selected, you could pop off the last breadcrumb, confirm row w user (being nice), then delete.