Find the position of the cursor in an EditorPane

Posted on 2003-10-21
Last Modified: 2010-04-17
is there a way to get the current position of the cursor in the (html) document being displayed by an EditorPane ???


Question by:duydien
  • 2

Accepted Solution

bhagyesht earned 250 total points
ID: 9597444
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>

function document_onmousemove()
window.text1.value="X="+window.event.clientX+" Y="+window.event.clientY


<SCRIPT LANGUAGE=javascript FOR=document EVENT=onmousemove>
<INPUT type="text" id=text1 name=text1>



Expert Comment

ID: 10321809
Accept answer by bhagyesht
Bhagyesh Trivedi

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
wordlen challenge 3 66
Eclipse Neon start with Admin account only 6 123
Counting documents in a Domino View 3 81
c++ reading data from file into two dimensional array 3 107
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question