Code example for Choice

Methods: dispatchEvent

0
    } 
 
    @Override 
    protected void fireActionEvent() { 
        super.fireActionEvent(); 
        awtComponent.dispatchEvent(new ActionEvent(awtComponent, ActionEvent.ACTION_PERFORMED, getActionCommand()));
    } 
 
    @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. 
     * 
Contextual code suggestions in your IDE  Get Codota for Java