static void selectLineInTextArea(final JTextArea ta, final int line) { swing { S text = getText(ta); int i = lineNrToCharIndex(text, line); int j = lineNrToCharIndex(text, line+1); ta.select(i, j); } }
Began life as a copy of #1015093
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: | #1015094 |
Snippet name: | selectLineInTextArea |
Eternal ID of this version: | #1015094/2 |
Text MD5: | e2ec6b3753cd7d67f099180e50ceb88e |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-05-08 12:10:25 |
Source code size: | 228 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 298 / 331 |
Version history: | 1 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |