Text Area Mouse Position
Posted on 2006-04-09
I need the following code:
A text area to be created that is 60col x 20 rows, I need the font in this text area to be fixed width!! I need to know that at all times the most 1 line can contain is 60bytes.
I need to code to figure out where the mouse is in this text area when the mouse moves over it, I need to know the column and row where the mouse is, not the x,y coordinates. I also need the Column and Row when the user clicks somewhere in the text area.
I'm not familiar with Java, however, I cant image this being all that difficult, calculate width of fixed width font we are using, do same with height, then once you know x,y coordinates in the text area, figuring out Column and Row cant be too difficult.