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

5
LINES

< > BotCompany Repo | #1016903 // selectAllOnFocus

JavaX fragment (include)

static <A extends JTextComponent> A selectAllOnFocus(final A tc) {
  if (tc != null)
    onFocus(tc, r { awt { tc.selectAll() } }); // important to wait one AWT cycle
  ret tc;
}

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: #1016903
Snippet name: selectAllOnFocus
Eternal ID of this version: #1016903/3
Text MD5: 92d30c8ad25790c2c199e5a01a327ab9
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-07-07 14:33:49
Source code size: 182 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 264 / 295
Version history: 2 change(s)
Referenced in: [show references]