This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
dev build 200311241900 This method has been relaced by JCheckBox.setText()
This is strange bug. I saw it reported several times but nobody ever told me how to reproduce it. It never happened to me. Please see issue 29779 or issue 28921. Could you provide more details? Or will this again end up as WORKSFORME? ;)
Ah ha! Found it! (Took me a while) JLabel has two properties. It has "text" and "label". If the user sets the value of the "label" property in the properties window it'll generate the setLabel() call. We should hide the deprecated property.
We may hide the 'label' property, it's simple. But note it is now in the "Other Properties" category while the right 'text' property is the main "Properties" category where the user finds all the properties she usually needs so needs not to expand and search the other properties.
Can't we hide it altogether?
You mean hide the "Other Properties" completely? We cannot do that, there might be something useful. And if you collapse the category once, it won't bother you much. Generaly I don't like much hiding the properties - form editor should be a tool working with beans generally - it's up to the authors to decide what properties should be visible (in BeanInfo). Unfortunately, Swing components are not supported well in this way. So I will hide the 'label' property.
Agreed. This is a good solution. A better solution, IMH, would be mark all deprecated properties with italics to make them stand out and move them to OTHER PROPERTIES. If you don't mind, I'll modify this issue to become a feature request to do just that.
Okay, sounds reasonable.
Actually, strikeout seems like a better choice than italic (also consistent with code completion, etc.).
Tim, Agreed. Strikeout makes more sense. This still depends on issue #29466 though, right?
Tomas, I also noticed that once "label" has been set, it is impossible to remove it. For example, I set the "label" fo a button then go into the "text" property and reset it to nothing. Going back into the underlying code I see setLabel() is still there.
Scratch that last comment. Deferred code generation was on.
Not sure if we can recognize the deprecated methods somehow. Annotations from 1.5 seem to me the only way.
IDE6.1: "label" property is still visible -> "setLabel(..)" [striked] is generated for JButton or JCheckBox