Why Tables in Two diff Panels not updated synchronously?
Dera Friends:
I have two JPanels PA and PB with same Frame, each Panel contains same table TA and TB separately, PA has TA, PB has TB,
TA listens to TB, so when I insert rows in TB, TA will insert same No of rows in TA in the same position,
I test success in this scenario,
But when I move this pair PA/PB into another more complicated JPanel but still within same JFrmae, strange thing happens,
when I insert 2 rows in TB, TA will insert 4 rows in TA and not in the same position,
when I insert 10 rows in TB, TA will insert 20 rows in TA and not in the same position,
TB always doubles row No of TA,
Why?
Thanks
sunny
# 1
sorry, should be:
with each insert click, 2 rows in TB will be inserted but TA will insert 1 rows in TA only and not in the same position with each insert click;
and so on,
TB always doubles row No of TA with each click;
TB is master, TA is slave
Why?
Thanks
# 2
> Why?
You have a coding problem.
If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program[/url] (SSCCE) that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags[/url] so the code retains its original formatting.