RFR: 8284619: javax/swing/JTable/8236907/LastVisibleRow.java failed with "Test Case Failed!!, Last Row not Visible!!!"
Tejesh R
tr at openjdk.java.net
Fri Jun 10 10:34:03 UTC 2022
On Fri, 10 Jun 2022 09:15:15 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:
> > > Was there any reason of calling table.setFocusable(false) in clearSelect()? We have some focus related mach5 issues in macos that crops out intermittently so maybe we should get rid of that if it's not needed. I think just calling clearSelection() would have been enough. Can you please check?
> >
> >
> > Yeah, table.setFocusable(false) is added intentionally, it is added to disable the cell focus. After selection the focus remains in cell, so in order to release the focus I used it. Any alternative to this is available?
>
> Even if the focus remains in the cell, what was the problem? I guess the problem was the contents was not drawn initially and only was getting drawn if rowcell is clicked. So, before and after mouseclick, the bufferedimage contents should be same, I guess focus is irrelevant here.
No issue with the contents drawn. Before mouseclick there wouldn't be any focus on any cell, but after mouseclick the focus will be seen on the clicked cell. In order to remove that set focus, setFocusable(false) is required. Otherwise the matching fails due to cell focus draw as rectangular border around the cell.
-------------
PR: https://git.openjdk.org/jdk/pull/9117
More information about the client-libs-dev
mailing list