This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Hello everyone,
I created a program that allows teachers to create topics from different assignments and compare grades and get an overall comprehension level. The program uses tabs to help the user go step by step to the final overview tab. I have an Import, Allocate Assignments, and Overview tab that all share a Gradebook object.
The problem is the Gradebook object is not updating in every tab. My work-around was to update every tab by passing in a new Gradebook object every time the user changes tab. I do not like this setup because the program updates even if nothing was changed in the Gradebook object, which is inefficient. Is there a better way?
Thank you for your input. I did not realize there was even such a thing available. I Google searched property change listener and found a tutorial directly from Sun, here How to Write a Property Change Listener.
Seems I have much to learn since the tutorial began talking about JavaBeans. I do not have any experience with Beans, does anyone know a great resource to get me in the right direction?
Thank you! It will take me time to understand all of this. E.G., I had to look up POJO, which I now know is an acronym for "Plain Old Java Object".
I am confused by your final POJO string. Can the string contain anything? I guess I'm wondering what the purpose of the string is in general.
When you fire a property change event, you need to send a string to identify what property is been changed.
Lets say all your tabs are listeners of a different property change, what will happen is: Any time any property changes, all your tabs are going to be warned, it's up to the tabs to know if the changed property is the one that matters to then.
When I did it the first time I had a nice tutorial about it but apparently I don't have it anymore .
Vandre Caetano wrote:
When you fire a property change event, you need to send a string to identify what property is been changed.
So is it possible to have multiple properties being checked for changes?
Vandre Caetano
Greenhorn
Joined: Dec 19, 2007
Posts: 14
posted
0
Sunny Rodriguez wrote:
Vandre Caetano wrote:
When you fire a property change event, you need to send a string to identify what property is been changed.
So is it possible to have multiple properties being checked for changes?
Yes, you actually check for all properties change, and in the listener implementation you verify what property was changed and what you want to do with it.
Try to code a little, even if you fell insecure, if after a while you still fell too lost, I'll post a more detailed example.