static void registerRightKey(JFrame frame, O r) { S name = "Right"; Action action = abstractAction(name, r); JComponent pnl = frame.getRootPane(); KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0); pnl.getActionMap().put(name, action); pnl.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(keyStroke, name); }
Began life as a copy of #1006687
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1006688 |
Snippet name: | registerRightKey - register cursor-left key for a whole JFrame |
Eternal ID of this version: | #1006688/1 |
Text MD5: | 1eddf1fe5f842e6e1d47ff3bd4040920 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-01-31 06:14:09 |
Source code size: | 346 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 475 / 488 |
Referenced in: | [show references] |