In order to have a Netbeans liked property inspector windows, I am making use of the following class to help me achieve this.
com.l2fprod.common.propertysheet.PropertySheetPanel
So far, it works fine for class with simple properties like String, int...
However, when come to slightly complicated class with composited relationship, things get more complicated.
For example, I have two animals (interface). One is Cat (Simple class with name and age) and Dog (Another simple class with name and age).
It takes no effort to display them through GUI windows.
However, when come to class with composited relationship. A Zoo, which can contains multiple animals (A class with array list to hold animals), I have problem to display all the animals properties within a single window.
The following is the screen shoot
(source: googlepages.com)
Partial source code is shown here
ObjectInspectorJFrame objectInspectorJFrame0 = new ObjectInspectorJFrame(cat);
objectInspectorJFrame0.setVisible(true);
objectInspectorJFrame0.setState(java.awt.Frame.NORMAL);
ObjectInspectorJFrame objectInspectorJFrame1 = new ObjectInspectorJFrame(dog);
objectInspectorJFrame1.setVisible(true);
objectInspectorJFrame1.setState(java.awt.Frame.NORMAL);
// I wish to see all "animals" and their properties in this windows. :(
// How?
ObjectInspectorJFrame objectInspectorJFrame2 = new ObjectInspectorJFrame(zoo);
objectInspectorJFrame2.setVisible(true);
objectInspectorJFrame2.setState(java.awt.Frame.NORMAL);
Complete source code can be downloaded from
http://yancheng.cheok.googlepages.com/sandbox.zip
I wish within "Zoo" windows, it can display all the properties for all animals.