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

4
LINES

< > BotCompany Repo | #1036421 // caretLineAndCol

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (10001L/56K).

1  
static LineAndColumn caretLineAndCol(JTextComponent tc) {
2  
  Pair<S, Int> p = textAndCaretPosition(tc);
3  
  ret charIndexToLineAndColumn(p.a, p.b);
4  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1036421
Snippet name: caretLineAndCol
Eternal ID of this version: #1036421/1
Text MD5: 4fdfdfec0d81ff42097bbcb44fa6874f
Transpilation MD5: 7fb1934e6b5c0d5a53197162e01f304c
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-12-11 18:16:05
Source code size: 149 bytes / 4 lines
Pitched / IR pitched: No / No
Views / Downloads: 61 / 89
Referenced in: [show references]