Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

8
LINES

< > BotCompany Repo | #1016821 // registerTab - register tab key for a whole JFrame (doesn't work)

JavaX fragment (include)

static void registerTab(JFrame frame, O r) {
  S name = "Tab";
  Action action = abstractAction(name, r);
  JComponent pnl = frame.getRootPane();
  KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0);
  pnl.getActionMap().put(name, action);
  pnl.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(keyStroke, name);
}

Author comment

Began life as a copy of #1003691

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1016821
Snippet name: registerTab - register tab key for a whole JFrame (doesn't work)
Eternal ID of this version: #1016821/4
Text MD5: 5c0429e10059dfa36ab02dee1b1a030a
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-07-03 15:36:27
Source code size: 337 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 275 / 316
Version history: 3 change(s)
Referenced in: [show references]