_setText (text = string);
text = string; char [] text = new char [string.length ()]; string.getChars (0, text.length, text, 0); int mnemonic = fixMnemonic (text); byte [] buffer = Converter.wcsToMbcs (getCodePage (), text, true); int xmString = OS.XmStringParseText ( buffer, 0, OS.XmFONTLIST_DEFAULT_TAG, OS.XmCHARSET_TEXT, null, 0, 0); if (xmString == 0) error (SWT.ERROR_CANNOT_SET_TEXT); if (mnemonic == 0) mnemonic = OS.XK_VoidSymbol; int [] argList = { OS.XmNlabelType, OS.XmSTRING, OS.XmNlabelString, xmString, OS.XmNmnemonic, mnemonic, }; OS.XtSetValues (handle, argList, argList.length / 2); if (xmString != 0) OS.XmStringFree (xmString);
public void setText (String string) {	checkWidget();	if (string == null) error (SWT.ERROR_NULL_ARGUMENT);	if ((style & SWT.ARROW) != 0) return;	/*	* Feature in Motif.  Motif does not optimize the case	* when the same text is set into a button causing	* it to flash.  The fix is to test for equality and	* do nothing.	*/	if (text.equals (string)) return;	_setText (text = string);}