Libraryless. Click here for Pure Java version (40L/1K).
svoid addPopupTrigger(JComponent c, IVF1<MouseEvent> r) { c.addMouseListener(new MouseAdapter { public void mousePressed(MouseEvent e) { if (e.isPopupTrigger()) r.get(e); } }); }
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1034162 |
| Snippet name: | addPopupTrigger |
| Eternal ID of this version: | #1034162/1 |
| Text MD5: | 01df5c127315d846e89d510886fc67e6 |
| Transpilation MD5: | a16ff6338eef153efac1e63078bdd634 |
| Author: | stefan |
| Category: | javax / gui |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-01-24 22:55:40 |
| Source code size: | 211 bytes / 8 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 339 / 450 |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |