Im currently doing my project "sukatoa notepad"!!! and im inspired to code it for that it looks like windows notepad... and it is 97 percent complete!!!
But i get stucked of the last part, "Counting the lines" (update the caretPosition);
Ive formulated 4 algorithms that will count the lines '\n' from the textArea....
those four algorithms is sucks when it is greater than 210 lines...
I mean the performance starts to slow after 100th lines...
(I used it to update the Line position)/(On what line is my caretPosition now!!!)
Calling that method from textAreaKeyRele ased event....
Ive test those algorithms by this example...
The quick brown fox jump over the lazy dog.(new line) times 800...
I need your advice and idea how you implement the fastest way to count the lines...(for updating lines starts from zero to the last character where the caret positioned.... getCaretPositio n)....
Which is the best Event to call my future method(Update what line)?(keyPress ed or KeyReleased?).. ...
if you have the algorithm, can you show it?!!
Thank you so much Experts!!!
I will appreciate any reply...
But i get stucked of the last part, "Counting the lines" (update the caretPosition);
Ive formulated 4 algorithms that will count the lines '\n' from the textArea....
those four algorithms is sucks when it is greater than 210 lines...
I mean the performance starts to slow after 100th lines...
(I used it to update the Line position)/(On what line is my caretPosition now!!!)
Calling that method from textAreaKeyRele ased event....
Ive test those algorithms by this example...
The quick brown fox jump over the lazy dog.(new line) times 800...
I need your advice and idea how you implement the fastest way to count the lines...(for updating lines starts from zero to the last character where the caret positioned.... getCaretPositio n)....
Which is the best Event to call my future method(Update what line)?(keyPress ed or KeyReleased?).. ...
if you have the algorithm, can you show it?!!
Thank you so much Experts!!!
I will appreciate any reply...
Comment