I want to have a JToolBar that have all the controls like add, edit, delete, save, etc on my java program. I want that toolbar to have control on all the panels that will be opened through my JTabbedPane. Is there a more convenient way to have the control of all the panels on just one toolbar because my implementation was, I will pass the toolbar on each panel class (tab) eveytime I open it. I also tried using the java reflections but Im not sure if it is that efficient for my program.
Sounds like you need some kind of context/state manager. Basically you may want to use a globally accessible, singleton manager that can maintain the current "context". This means that as some control becomes active, you will want to register it as the "active" context.
When the user clcks on a button in the toolbar, the button can find the active context & perform the required actions.