private void openContextMenu(MouseEvent e){
  if (e.isPopupTrigger()) {
    EmoticonImage emote=((Emote)e.getSource()).emote;
    JPopupMenu m=new EmoteContextMenu(emote,contextMenuListener);
    m.show(e.getComponent(),e.getX(),e.getY());
  }
}

private void openContextMenu ( MouseEvent e ) { if ( e . isPopupTrigger ( ) ) { EmoticonImage emote = ( ( Emote ) e . getSource ( ) ) . emote ; JPopupMenu m = new EmoteContextMenu ( emote , contextMenuListener ) ; m . show ( e . getComponent ( ) , e . getX ( ) , e . getY ( ) ) ; } }
on right - click on an emote , open the appropriate context menu .
