getAccessible().addAccessibleListener(new AccessibleAdapter() {
AccessibleAdapter accessibleAdapter = new AccessibleAdapter() { public void getName(AccessibleEvent e) { String name = null; Label label = getAssociatedLabel (); if (label != null) { name = stripMnemonic(label.getText()); } e.result = name; } public void getKeyboardShortcut(AccessibleEvent e) { String shortcut = null; Label label = getAssociatedLabel (); if (label != null) { String text = label.getText(); if (text != null) { char mnemonic = getMnemonic(text); if (mnemonic != '\0') { shortcut = "Alt+"+mnemonic; } } } e.result = shortcut; }
void initAccessible() {	getAccessible().addAccessibleListener(new AccessibleAdapter() {		public void getHelp(AccessibleEvent e) {			e.result = getToolTipText();		}	});		getAccessible().addAccessibleTextListener(new AccessibleTextAdapter() {		public void getCaretOffset(AccessibleTextEvent e) {			e.offset = text.getCaretPosition();		}	});		getAccessible().addAccessibleControlListener(new AccessibleControlAdapter() {		public void getChildAtPoint(AccessibleControlEvent e) {			Point testPoint = toControl(new Point(e.x, e.y));			if (getBounds().contains(testPoint)) {				e.childID = ACC.CHILDID_SELF;			}		}				public void getLocation(AccessibleControlEvent e) {			Rectangle location = getBounds();			Point pt = toDisplay(new Point(location.x, location.y));			e.x = pt.x;			e.y = pt.y;			e.width = location.width;			e.height = location.height;		}				public void getChildCount(AccessibleControlEvent e) {			e.detail = 0;		}				public void getRole(AccessibleControlEvent e) {			e.detail = ACC.ROLE_COMBOBOX;		}				public void getState(AccessibleControlEvent e) {			e.detail = ACC.STATE_NORMAL;		}		public void getValue(AccessibleControlEvent e) {			e.result = getText();		}	});}