Stec Records Forum

Software => Development => Java => Topic started by: bsellon on May 29, 2010, 12:18:45 PM

Title: Deprecated setLabel still used by NetBeans
Post by: bsellon on May 29, 2010, 12:18:45 PM
For Netbeans 6.7.1, when setting text on buttons, use the "text" property NOT the "label" property.  They are related and will fill each other in but if you put the text in the "label" field, Netbeans will generate code using the deprecated setLabel method. 

If you enter the text into the "text" property, it uses setText which is still available.

From looking at the properties list, it looks the same but, because of "special bond" between the properties, the first field to be filled in wins.

This is a Netbeans bug/upgrade issue. Haven't checked 6.8 yet.

This is a typical error message:

C:\mydrive\projectfolder\ProjectFile.java:436: warning: [deprecation] setLabel(java.lang.String) in javax.swing.AbstractButton has been deprecated
Title: Re: Deprecated setLabel still used by NetBeans
Post by: Keith on June 01, 2010, 04:51:29 PM
They have a 6.9 version out now