Hmm... Well I haven't worked with JScrollPane much, but I'll try to offer some help.
First of all, I may suggest making your JScrollPane bigger. This is my simplest solution, but also a rather volatile solution...
If you don't like the first solution (I don't
), then maybe you could try using a
FocusListener (
documentation here). You could add it to the JLabel that is causing the problem, and
tell one of the JTables to request the focus whenever the JLabel retrieves it.
Maybe an alternate solution if you don't want to mess with FocusListeners: you could use two JScrollPanes, one for each JTable, instead of one. This way, both of your JTables would always be displayed no matter what, because they would each have their own individual JScrollPanes to navigate their contents.
Here are some links if you want to do some rummaging around of your own:
Focus Subsystem Tutorial
JScrollPane Documentation (Java 7)
JScrollPane Tutorial
Good luck on your project!