I have some problem with searching a value(focusing on the selected searched row).
when I run the program the table doesnt have the selection focus (if that is the right term to say). I have to click first in any of the cells in the table, so the selection will be on focus.
(is there any way to make a default selection focus in a JTable?)
when the program searches for the equivalent "name" input in the text field, it highlights it but the "scroll" doesnt scroll down to view the part where that value resides
heres a program for the auto scroll.
I tried to get some idea on this program but I only know how to scroll automatically at the "bottom", what I need now, is to specify the view of the scroll according to the searched value.. I tried to search and play with Viewports, but Im still stuck with this problem, I'm not also sure If the viewport can help me with this... please I need more help...
In pseudo code
1) User types something
2) Figure out which cell has a match
3) Scroll to the required cell.
tnx for the psedocode sir,
,, this one was reffering to the cell I never thought of that thank you for that,
I solved that part.. But the problem now is the highlight of the specific cell, those codes that I posted was just for illustrating the problem, but in my original code
I have a rendered table with Image background, when I clicked(selected) a cell I dont see a highlight but the foreground color of the text in the cell changes(Im fine with that),
what I want now is the selection focus,
For example I have already searched the value, the program will automatically highlight that cell , how can I accomplish this one?
I didnt mean to say that I didnt check it, actually it helped me a lot..Im just getting too confused on the resources that Im getting from google.. sorry for using such an informative words, but english is not my native language , im sorry,
what I mean with "no sir" ,- I didnt know what should I do In the method that you gave me to make a selection focus,
again, Im so sorry, I didnt intend to waste your effort, sorry for using such a word...