I'm making an application that allows users to view task lists stored in different databases. So what happens is that, I have a list of the names of browsable databases (stored as a text file). Program loads the first database in that list and displays contents. Then from a menu, I allow users to select another database in the list. (Kind of like, I want to view the tasks for Andy, and now Bob, and now Carl...).
Problem is, I don't know how to update the UI so that the contents of the new database is displayed. It's trivial to remove the tasks currently listed, read from the DB, and then repopulate. But I can't get to this code (from my Singleton database driver) because I would need access to the instance of my Runnable which was loaded to the EventQueue (all my JComponents are private, as with all tutorials I've so far encountered). I'm looking at the get/peek methods in EventQueue but they don't seem to be what I need since they return AWTEvents and I don't see any relation between AWTEvent and Runnable other than java.lang.Object.
So, is it possible to get the current Runnable? How?
Thanks in advance for any guidance.