I am having a problem in CardLayout
. I have around 15 cards in my swing application. Some cards are there for displaying the data from database, they should run the sql and display the data. The name of a such card is "Lawyers".
But my question is, how do I know that "Lawyer" card is being displayed so I can call the database queries? I am not interested in knowing whether "Lawyer" got displayed after "Account" card or something like that, I just need to know whether it is being displayed now.
Any suggestions?