Code example for Choice

Methods: dispatchEvent

0
    @Override 
    protected void fireItemStateChanged(ItemEvent e) {
        super.fireItemStateChanged(e);
        if (e.getStateChange() == ItemEvent.SELECTED) {
            peer.peerSelect(getSelectedIndex());
            awtComponent.dispatchEvent(SwingToolkit.convertEvent(e, awtComponent));
        } 
    } 
 
    /** 
     * Pass an event onto the AWT component. 
     * 
     * @see java.awt.Component#processEvent(java.awt.AWTEvent) 
     */ 
    protected final void processEvent(AWTEvent event) {
        awtComponent.dispatchEvent(SwingToolkit.convertEvent(event, awtComponent));
    } 
 
    public final void processAWTEvent(AWTEvent event) {
        super.processEvent(event);
Connect your IDE to all the code out there  Get Codota for Java