I'm writing a
java desktop application to learn java (it is an application to handle boy scout memberships)
and have hit design question.
I have a main jframe that has a jtable that holds checkbook records,
then I have another jframe with another jtable that will hold budget items for a check.
Ex. in the first table
check #100, summer camp, 2008, $1000.00
check #101, charter fees, 2008, $650.00
in the second table you have for check #100
200.00, gas
800.00, fees
for check #101
650.00, fees
What I want is when you scroll thru the first table the second table change as well.
Ex. when you are in the first record in the first table(#100) the second one shows
200.00, gas
800.00, fees
when you scroll to the second record the first table(#101) the second one shows
650.00, fees
I'm looking at two ways to do this
1) using events
2) using observable and observer
Any ideas on the best way or a third way?
Also there will be other jframes that will do things similar to the second jframe
(what members accounts are debited or credited with this check.)( I put the tables in
separate frames to be able to turn then off)
Thanks