I'm interested in creating a data-driven JPanel that can be used in different containers.
In a JDialog, it's easy to manage resources when the dialog is opened (acquire) or closed (release). This allows the
client to create the dialog, use it, dispose it properly and not to have to manage resources.
I am investigating ComponentListener, but I'm not catching the proper events. Currently, I'm stuck with forcing the parent container to manage resources, which appears ok, but ties the JPanel to the parent.
Anyone have an idiom for acquiring and releasing
resources for JPanel?
In a JDialog, it's easy to manage resources when the dialog is opened (acquire) or closed (release). This allows the
client to create the dialog, use it, dispose it properly and not to have to manage resources.
I am investigating ComponentListener, but I'm not catching the proper events. Currently, I'm stuck with forcing the parent container to manage resources, which appears ok, but ties the JPanel to the parent.
Anyone have an idiom for acquiring and releasing
resources for JPanel?