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

8
LINES

< > BotCompany Repo | #1015094 // selectLineInTextArea

JavaX fragment (include)

1  
static void selectLineInTextArea(final JTextArea ta, final int line) {
2  
  swing {
3  
    S text = getText(ta);
4  
    int i = lineNrToCharIndex(text, line);
5  
    int j = lineNrToCharIndex(text, line+1);
6  
    ta.select(i, j);
7  
  }
8  
}

Author comment

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: 240 / 271
Version history: 1 change(s)
Referenced in: [show references]