Updated resource file...
http://www.netbeans.org/kb/60/java/gui-binding.html confuses a lot
other than my saved file from the zip has the following about
Binding Beans & Data in a Desktop ApplicationThis new resource is hard to catch up in the last (latest section that says),
_______________________________________________________________________________
To bind the data to a JComboBox component:Select the combo box.
In the Properties tab of the Properties window, select the renderer property.
Click the ellipsis (...) button.
In the combo box at the top of the property editor, select Custom Code.
In the text area, enter code similar to the following (where jComboBox1 is the name of
the JComboBox instance, MyEntityClass is the your entity class, and
getPropertyFromMyEntityClass() is the getter for the property in the entity class
which you are binding.
jComboBox1.setRenderer(new DefaultListCellRenderer() {
@Override
public Component getListCellRendererComponent(
JList list, Object value, int index, boolean isSelected, boolean
cellHasFocus) {
super.getListCellRendererComponent(list, value, index, isSelected,
cellHasFocus);
if (value instanceof MyEntityClass) {
MyEntityClass mec = (MyEntityClass)value;
setText(mec.getPropertyFromMyEntityClass());
}
return this;
}
})
This isn't an understable subject. The author seems to be working with it in a rush. To me its another world I can not understand. Why cant there just be a step-by-step approach in this last part, or why would the author seem to confuse us in such a sudden jump from what he started in the GUI examples. This should call for an immediate update of the tutorial otherwise, it would not be useful.
All the rest is useful to me in the previous file downloaded as part of the zip tutorial download, but when I searched for this link, I had diffeculty relating to what the author intends to help with his new addition.
In my case I have added the code above in the custom code that appears. I think I was following his instructions and my GUI is not working. Correcting the code with auto-completion or following the author's suggestions would not help either. Thanks for the undo module.
Has anybody there have a working tutorial on this Netbeans 6 Binding Subject? Should the author feel obligue to do a followup on his subject matter covered?
Best Regards,
Alpha.Omega