Libraryless. Click here for Pure Java version (40L/1K).
1 | svoid addPopupTrigger(JComponent c, IVF1<MouseEvent> r) { |
2 | c.addMouseListener(new MouseAdapter { |
3 | public void mousePressed(MouseEvent e) { |
4 | if (e.isPopupTrigger()) |
5 | r.get(e); |
6 | } |
7 | }); |
8 | } |
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: | 130 / 195 |
Referenced in: | [show references] |