K
Krick
I'm trying to design something in Java and I've entered an area where
I've have no experience.
Essentially, I have a non-GUI object that has a lot of internal
variables, some of which are dependent on and also modify others.
So if I call MyObject.setVariable1(20), the object updates all other
dependent internal variables.
Now given that, I want to connect it to a GUI.
Each variable in my object will be connected to a GUI component that
will reflect the state of that variable.
In turn, each GUI component will modify its respective variable in the
object when the user changes the state of the component.
The piece of the puzzle that I'm missing is how to make an object that
can notify all the GUI controls that its state has changed.
I assume that it has to fire an event of some kind, and all the
controls have to listen for it. I'm at a loss as to how I do that.
Should I derive my object from component do I can piggyback off the
AWT event architecture?
Can anyone point me at some good source examples or articles that
might give me a push in the right direction?
....
Krick
I've have no experience.
Essentially, I have a non-GUI object that has a lot of internal
variables, some of which are dependent on and also modify others.
So if I call MyObject.setVariable1(20), the object updates all other
dependent internal variables.
Now given that, I want to connect it to a GUI.
Each variable in my object will be connected to a GUI component that
will reflect the state of that variable.
In turn, each GUI component will modify its respective variable in the
object when the user changes the state of the component.
The piece of the puzzle that I'm missing is how to make an object that
can notify all the GUI controls that its state has changed.
I assume that it has to fire an event of some kind, and all the
controls have to listen for it. I'm at a loss as to how I do that.
Should I derive my object from component do I can piggyback off the
AWT event architecture?
Can anyone point me at some good source examples or articles that
might give me a push in the right direction?
....
Krick