posted 10 years ago
I need to let the refresh method be abstract from my custom panel class
since I need to refresh the inherited panels when things have changed (they are added to
a JTabbedPane). Now my question is should I put the initialization code there within
the refresh method so that it can be reused as well.
But my problem is as the object of those panels are member
variables of the parent class, all the listeners could have been
added twice and some peculiar results would come out.
I thought about divide them into 2 methods. One called
setup(), one refresh(), setup() is used for
initalization and refresh() is used for
JTabbedPane refreshing, but I don't know if I have done too much
for the class. What do you think?
Thanks
Jack