My Pivot App uses JDK ServiceLoader to load "modules" for an Accordion.
Some of the modules will pull data from a remote server and do some
initialization when created so I want to do it when each panel is shown
for the first time.
I want to check if my approach is viable: Most Panels are ScrollPanes,
and they are ofcourse unexpensive to create. I then override the
layout() method and to something like:
protected void layout() {
if (!initialized) {
setColumnHeader(createColumnHeader());
setView(createView());
initialized = true;
}
super.layout();
}
This seems to work, but is it an OK approach?
-- Edvin