JcheckBox in Jtable

I have a checkbox in my Jtable.Check column displayed in the center of the column. My problem is that when I click on the checkbox, it moves to the left of this column and comes to the center of functionality. Wise work is wonderful. Can someone tell how to stop moving a flag

Thanks ganesha

+3
source share
1 answer

The handler and editor are processed separately. Therefore, when you click on a cell, it displays the editor component instead of the rendering component displayed earlier. It looks like you have centered the JCheckBox used as a renderer, but not the JCheckBox used as an editor. Center the editor the same way you centered the renderer.

This is the best answer I can give you without further details.

+2
source

Source: https://habr.com/ru/post/1766139/


All Articles