I'm lost: I have JFrame, in JFrame is JTabbedPane and in JTabbedPane are 4 JPanels (tabs). On each JPanel (tab) is JScrollPane with JTable (total: 4 JTable's). Each JTable I'm populating with data from DB at the moment of start app - works perfect.
Now I would like populate data for each JTable at the moment when I click on JTabbedPane (tab). I was trying: "public class MyTest1Tab extends JPanel implements FocusListener" with "this.addFocusListener(this);" in constructor and I have implemented focusGained(FocusEvent e) and focusLost(FocusEvent e) methods. But I feel, that this solution isn't corrrect.
From my point of view I need something like listening for click on tabs on JTabbedPane or some event which is fired when JTable is shown.
Does someone know how I can listen for specific JTable is shown?
 
     
     
    