How to send messages / events ??
So I've been making various widgets in netbeans for reusability reasons, and one problem I have encountered is that when one widget performs something or finishes executing something, how do I get my other widgets or frames to respond?
For example, I made a browser window that queries for model files and displays information about these files in a JTable. You can select things by row only and there is a button to load load the file. This widget is part of a parent Frame which has a canvas to display the model. Now everything works just fine, it load straight from the server and all, but I have subsequent frames that hold other information about the model such as animations and transform information that I need to update once the model is loaded.
The main frame/window contains objects of all these widgets. I thought maybe I could do firepropertychange(string, object, object) and add a propertychangelistener that would respond accordingly. It gets fired off but it is never recieved, I'm guessing because it's not really a propertychange.
What I am trying to do is that once the model is loaded by widget1, a message or event is sent and then it's parent can call it's reset function to update all the other widgets. I hope that makes sence.
Thanks In Advance,
PS.: Just some more clarification just in case... these widgets are comprised of panels, comboboxes, buttons, radio buttons, checkboxes, etc... I made these seperate widget components for grouping purposes and to keep the code clean with each widget only concerned with what it needs to function.