void (String label, KeyStroke ks) { ensureNativePeer(); // convert (code from native_peer.setLabel) char keyChar = ks == null ? 0 : ks.getKeyChar(); int keyCode = ks == null ? 0 : ks.getKeyCode(); int modifiers = ks == null ? 0 : ks.getModifiers(); if (label == null) { label = ""; } if (keyChar == KeyEvent.CHAR_UNDEFINED) { keyChar = 0; } myTitle = label; nativeSetTitleAndAccelerator(nativePeer, label, keyChar, keyCode, modifiers, isInHierarchy); }